This is a simple blog website with separate frontend and backend components. The frontend is built using React and Vite, while the backend is powered by Node.js and Express, with data stored in MongoDB using Mongoose.
cd frontend
npm install
To start the development server:
npm run dev
To build the production-ready application:
npm run build
To lint the code:
npm run lint
To preview the production build:
npm run preview
- axios: Promise-based HTTP client for the browser and Node.js
- react: JavaScript library for building user interfaces
- react-dom: DOM-specific methods for React
- react-icons: SVG icons for popular icon packs
- react-router-dom: Declarative routing for React.js
- @types/react: TypeScript types for React
- @types/react-dom: TypeScript types for React DOM
- @vitejs/plugin-react: Vite plugin for React support
- autoprefixer: PostCSS plugin to parse CSS and add vendor prefixes
- eslint: Pluggable JavaScript linter
- eslint-plugin-react: React-specific linting rules for ESLint
- eslint-plugin-react-hooks: ESLint rules for React hooks
- eslint-plugin-react-refresh: ESLint rules for React fast refresh
- postcss: Tool for transforming styles with JavaScript plugins
- tailwindcss: Utility-first CSS framework
- vite: Next-generation frontend tooling
cd backend
npm install
To start the server:
npm start
To start the server with nodemon for development:
npm run start dev
- bcrypt: Library for hashing passwords
- cookie-parser: Parse Cookie header and populate req.cookies
- cors: Middleware to enable CORS with various options
- dotenv: Loads environment variables from a .env file
- express: Fast, unopinionated, minimalist web framework for Node.js
- jsonwebtoken: Implementation of JSON Web Tokens
- mongoose: MongoDB object modeling for Node.js
- multer: Middleware for handling
multipart/form-data
- nodemon: Monitor for changes in your application and automatically restart the server
- path: Provides utilities for working with file and directory paths