This project is a full-stack web application consisting of a React frontend (dashboard/) and a Node.js + Express backend (backend/). The backend serves APIs, and the frontend consumes them.
project-root/
βββ backend/
β βββ .env # Environment variables (not committed)
β βββ package.json # Backend dependencies and scripts
β βββ index.js # Entry point of Express server
β βββ config/ # DB config, JWT config, etc.
β βββ controllers/ # Route handler functions
β βββ models/ # Mongoose/Sequelize models (DB schemas)
β βββ routes/ # Express route definitions
β βββ middlewares/ # Auth middleware, error handling, etc.
β βββ utils/ # Utility/helper functions
β βββ services/ # External service logic (e.g., payment, mail)
β
βββ dashboard/
β βββ .env # Frontend environment variables (not committed)
β βββ package.json # Frontend dependencies and scripts
β βββ public/ # Static assets (index.html, icons, etc.)
β βββ src/
β β βββ index.js # Entry point
β β βββ App.js # Root component
β β βββ assets/ # Images, fonts, logos, etc.
β β βββ components/ # Reusable UI components (Button, Navbar, etc.)
β β βββ pages/ # Page components (Home, Dashboard, Login, etc.)
β β βββ services/ # API logic (axios functions, etc.)
β β βββ hooks/ # Custom React hooks (optional)
β β βββ context/ # Global state providers (AuthContext, etc.)
β β βββ styles/ # CSS or Tailwind config (optional)
β
βββ .gitignore # Ignore .env, node_modules, build folders, etc.
βββ README.md # Project overview and setup guide| Layer | Tech |
|---|---|
| Frontend | React, Axios |
| Backend | Node.js, Express |
| DB | MySQL |
| Styling | Tailwind CSS |
| Auth | JWT |
| Config | Dotenv |
# Go to backend folder
cd backend
# Install dependencies
npm installPORT=5000
DATABASE_URL=your_database_url
JWT_SECRET=your_jwt_secretnpm run dev
# OR
node index.js# Go to dashboard folder
cd ../dashboard
# Install dependencies
npm installREACT_APP_API_URL=http://localhost:5000/api
npm start
# Ignore environment files
*.env