Skip to content

Commit 6755f6b

Browse files
author
fred
committed
add security features
1 parent bfd8025 commit 6755f6b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

README.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11

22
## Application Features
3-
1. Startup Landing Page (and the website in general)
3+
1. In general:
44
- Engaging and non-distracting web design.
55
- Pleasant, not overwhelming, to the eyes.
66
- Simple but informative, guiding users through the features without creating any confusions.
7+
- Google-level security
8+
- Set up Content Security Policy to mitigate and detect XSS attacks.
9+
- Rejects requests without valid Firebase application ids to prevent unauthorized server endpoint access.
10+
- Expires tokens after each request to prevent replay attacks.
11+
- Rate limits each ip (and VPNs). Considered the possibility where the application uses a proxy by checking the `x-forwarded-for` header as a backup option for ip.
12+
- Data are stored in Google's Firebase.
13+
- Anti-DDoS.
714
2. Login:
815
- **SignUpForm:** Allows users to sign up using their email and password, and validates the input fields using regular expressions and conditions.
916
- **LoginForm:** Allows users to log in using their email and password, and securely validates the input fields using Firebase.
@@ -14,9 +21,6 @@
1421
- **ChatHeader**: Allows users to hover over an info icon to see a walkthrough of the chat interface.
1522
- **Export**: Export & save the current chat session in a txt, json, or pdf format.
1623
- **Chatbot**: Allow users to chat with a LLM that can view and describe image contents without exposing API keys by securely requesting Firebase Functions server endpoints for HuggingFace API requests.
17-
- Rejects requests without valid Firebase application ids to prevent unauthorized server endpoint access.
18-
- Expires & generates tokens after each request to prevent replay attacks.
19-
- Rate limits each ip (and VPNs). Considered the possibility where the application uses a proxy by checking the `x-forwarded-for` header as a backup option.
2024
- **ChatContent**: Starts and saves chat history to Firebase Firestore in an intuitive structure:
2125
```
2226
<user_id>: {
@@ -64,6 +68,7 @@
6468

6569
- [ ] Release Draw page
6670
- [ ] Release Dashboard page
71+
- [ ] Dynamic AES encryption
6772

6873
## Development Practices
6974
1. Refactored code by creating reusable and customizable components to build a foundation for fast feature development & changes.
@@ -112,10 +117,9 @@ Follow the setup guide at https://firebase.google.com/docs/web/setup#add_firebas
112117
- Under API keys, click on "Browser key (auto created by Firebase)"
113118
- Under "Set an application restriction", click on Website and add the URL of your app to prevent unauthorized access (read more at [Is it Safe to Expose Firebase APIKey to the Public](https://stackoverflow.com/questions/37482366/is-it-safe-to-expose-firebase-apikey-to-the-public))
114119

115-
3. This application sends requests to the HuggingFace API on the Firebase Functions server so that any API keys are not exposed to the client side. So, please set any environmental variables on the server using `firebase functions:config:set huggingface.api_key="your_api_key"`.
116-
120+
3. Set up Firebase Functions in your project root directory using `firebase init functions`. This application sends requests to the HuggingFace API on the Firebase Functions server so that any API keys are not exposed to the client side. So, please set any environmental variables on the server using `firebase functions:config:set huggingface.api_key="your_api_key"`.
117121

118-
4. Lastly, run the development server:
122+
4. Lastly, deploy the application to Firebase:
119123

120124
```bash
121125
firebase deploy --only "functions,hosting"

app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const FeatureCard = ({ title, description, icon, gradientFrom, gradientTo, posit
157157

158158
const AdvancedFeaturesDescription = () => {
159159
const sentences = [
160-
"Experience a secure login and user data storage system at the security level of Google services, with more robust security measures than Discord, including the latest captcha algorithm, anti-DDoS, rate limiting, user verification, security checks, protection against unauthorized attempts (e.g. replay attacks), and the world's strongest data encryption algorithms.",
160+
"Experience a secure login and user data storage system at the security level of Google services, with more robust security measures than Discord, including the latest captcha algorithm, anti-DDoS, rate limiting, user verification, security checks, protection against unauthorized attempts (e.g. replay attacks), and strong data encryption algorithms.",
161161
"Engage with a multimodal AI capable of human-like image understanding and conversation in a chat UI that organizes saved chats by time and offers customizable model parameters never seen in ChatGPT.",
162162
"Utilize an admin dashboard that not only tracks usage history but also accurately forecasts future usage trends.",
163163
"Unlock creative potential with personalized image generation powered by handpicked, top-quality API endpoints."

0 commit comments

Comments
 (0)