๐ง Admin Dashboard (Full Stack Demo)
A modern Admin Dashboard built with a Node.js (Express) backend
and a vanilla HTML/CSS/JS frontend.
๐ Project Overview
This project simulates a real-world admin panel where you can: - Manage
users - Create transactions - Generate reports - View statistics - Use a
dark/light theme - Work with protected authenticated pages
โ ๏ธ Runs in DEV_MODE (in-memory data, no database)
๐๏ธ Project Structure
project-root/ โโโ backend/ โโโ front-end/ โโโ README.md
โ๏ธ Backend
- app.js โ main server entry
- config/devData.js โ fake database (edit here for demo data)
- controllers/ โ business logic
- routes/ โ API endpoints
- middleware/ โ authentication protection
๐จ Frontend
HTML Pages
- index.html โ dashboard
- utilisateurs.html โ users
- transactions.html โ transactions
- statistiques.html โ stats
- parametres.html โ settings
- signin.html โ login
CSS
- global.css โ layout + dark/light theme
JavaScript
- auth.js โ authentication/session
- api.js โ API handler
- dashboard.js โ dashboard logic
- users.js โ users management
- transactions.js โ transactions logic
- theme.js โ theme switcher
๐ Data Flow
Frontend โ JS โ API โ Backend โ devData โ Response โ UI
๐งช Demo Mode
DEV_MODE=true
(no database, resets on restart)
๐งโ๐ป How to Run
Backend
cd backend
npm install
npm start
Frontend
http://localhost:3000/HTML/signin.html
Login
admin@example.com
Demo1234
โ ๏ธ Important
Do NOT edit data in HTML for logic.
Edit backend/config/devData.js instead.
๐ก Future Improvements
- Add real database
- Improve authentication
- Add charts
- Pagination