Daisy Social network for skincare sidequests! https://daisy-yuzh.onrender.com/
This project uses the following third-party libraries and APIs:
- Source: https://react.dev/
- License: MIT
- Purpose: JavaScript library for building user interfaces
- Usage: Core framework for all UI components
- Citation: Used throughout all
.jsxfiles in the/srcdirectory - Installation:
npm install react react-dom
- Source: https://tailwindcss.com/
- License: MIT
- Purpose: Utility-first CSS framework
- Usage: Styling all components using utility classes
- Citation: Used in
classNameattributes throughout components; configured intailwind.config.js - Installation:
npm install -D tailwindcss postcss autoprefixer
- Source: https://nodejs.org/
- License: MIT
- Purpose: JavaScript runtime environment
- Usage: Backend server runtime
- Citation: Used to run server code
- Source: https://expressjs.com/
- License: MIT
- Purpose: Web application framework for Node.js
- Usage: HTTP server, routing, and middleware
- Citation:
server/server.jsorserver/app.js - Installation:
npm install express
- Source: https://www.mongodb.com/
- License: Server Side Public License (SSPL)
- Purpose: NoSQL database
- Usage: Storing and querying application data (products, brands, etc.)
- Citation: Database connection in
server/database.jsor similar - Installation: Requires MongoDB server installation
- Source: https://mongoosejs.com/
- License: MIT
- Purpose: MongoDB object modeling library
- Usage: Schema definition, validation, and database queries
- Citation: Model files in
/server/models/directory - Installation:
npm install mongoose
- Source: https://www.npmjs.com/package/cors
- License: MIT
- Purpose: Enable Cross-Origin Resource Sharing
- Usage: Allow frontend to make requests to backend API
- Citation:
server/server.js-app.use(cors()) - Installation:
npm install cors
- Source: https://www.npmjs.com/package/dotenv
- License: BSD-2-Clause
- Purpose: Load environment variables from .env file
- Usage: Managing configuration secrets (database URLs, API keys)
- Citation:
server/server.js-require('dotenv').config() - Installation:
npm install dotenv
- Source: https://reactrouter.com/
- License: MIT
- Purpose: Client-side routing library
- Usage: Navigation between pages/views
- Citation:
src/App.jsxand route component files - Installation:
npm install react-router-dom
- Client Secret must be kept secret and never committed to version control
- Use
.envfile for credentials (included in.gitignore) - Always use HTTPS in production
- Validate redirect URIs in Google Console
- Limit OAuth scopes to minimum required (profile, email)
- Use strong session secret (generate with
require('crypto').randomBytes(64).toString('hex')) - Set secure cookie options in production:
cookie: { secure: true, // Require HTTPS httpOnly: true, // Prevent XSS maxAge: 24*60*60*1000, // 24 hours sameSite: 'lax'
- Source: https://vitejs.dev/
- License: MIT
- Purpose: Build tool and development server
- Usage: Fast development environment and production builds
- Citation:
vite.config.jsandpackage.jsonscripts - Installation:
npm create vite@latest
- Node.js v18 or higher
- MongoDB v6 or higher (if using MongoDB)
- npm or yarn package manager
-
Clone the repository
git clone [your-repo-url] cd [project-name] -
Install frontend dependencies
npm install
-
Install backend dependencies
cd server npm install cd ..
-
Set up environment variables
Create a
.envfile in the server directory:MONGODB_URI=mongodb://localhost:27017/your-database PORT=5000 # Add other environment variables as needed
-
Run the application
Terminal 1 (Frontend):
npm run dev
Terminal 2 (Backend):
cd server npm start
- Autocomplete Components (
ProductAutocomplete.jsx,BrandAutocomplete.jsx)- Custom implementation using React hooks
- ARIA accessibility patterns from W3C WAI-ARIA Authoring Practices: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
- Fuzzy Search (
fuzzySearch.js)- Levenshtein distance algorithm based on:
- Levenshtein, Vladimir I. (1966). "Binary codes capable of correcting deletions, insertions, and reversals"
- Implementation adapted from common JavaScript patterns
- Levenshtein distance algorithm based on:
- React team at Meta for the React framework
- Tailwind Labs for Tailwind CSS
- MongoDB Inc. for the MongoDB database
- Express.js team for the Express framework
- Google for OAuth 2.0 authentication services
- All other open-source contributors whose libraries made this project possible