A full-stack dashboard for managing projects, tracking progress, and collaborating with your team.
π Live Demo Β· πΈ Screenshots Β· β‘ Quick Start Β· π‘ API Docs
| Feature | Details |
|---|---|
| π Authentication | Register, login, JWT sessions (7-day expiry) |
| π Dashboard | Live stats, bar chart, pie chart, activity feed |
| π Projects | Full CRUD β create, edit, delete, search, filter, paginate |
| π€ Profile | Edit name, bio, location, website, change password |
| π Landing Page | Public marketing page with feature overview |
| π± Responsive | Mobile-friendly sidebar, adaptive grid layouts |
π To add screenshots: take them after running the app, upload them to
docs/screenshots/in your repo, then update the image paths below.
- React 18 β UI framework
- React Router v6 β client-side routing
- Recharts β bar and pie charts
- Lucide React β icons
- Axios β HTTP client
- Vite β build tool and dev server
- Node.js + Express β REST API server
- SQLite via
better-sqlite3β embedded database, zero setup - JWT β stateless authentication
- bcryptjs β password hashing
- dotenv β environment config
- Node.js v18 or higher
- npm v8+
git clone https://github.com/Hamzaa6296/dashboard.git
cd dashboardcd backend
cp .env.example .env
npm installCreate the data directory if it doesn't exist:
mkdir dataSeed demo data (recommended for first run):
node src/seed.jsStart the backend server:
npm run devβ
Backend running at http://localhost:5000
Open a new terminal:
cd frontend
npm install
npm run devβ
Frontend running at http://localhost:5173
Go to http://localhost:5173
After running the seed script, use these to log in instantly:
| Password | Role | |
|---|---|---|
| alex@demo.com | password123 | Admin |
| jordan@demo.com | password123 | Member |
| sam@demo.com | password123 | Member |
The admin account can delete any project. Members can only delete their own.
Base URL: http://localhost:5000/api
All protected routes require the header:
Authorization: Bearer <token>
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /auth/register |
β | Create new account |
| POST | /auth/login |
β | Login, returns JWT token |
| GET | /auth/me |
β | Get current logged-in user |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /projects |
β | List projects (supports ?search=, ?status=, ?page=, ?limit=) |
| GET | /projects/:id |
β | Get single project |
| POST | /projects |
β | Create project |
| PUT | /projects/:id |
β | Update project (owner or admin only) |
| DELETE | /projects/:id |
β | Delete project (owner or admin only) |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /users |
β | List all users |
| GET | /users/:id |
β | Get user profile + their recent projects |
| PUT | /users/:id |
β | Update profile (own account only) |
| PUT | /users/:id/password |
β | Change password (own account only) |
| DELETE | /users/:id |
β | Delete account |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /stats/dashboard |
β | Totals, chart data, recent activity |
GET /api/health
# β { "status": "ok", "timestamp": "..." }dashboard/
βββ backend/
β βββ data/ # SQLite database (auto-created, git-ignored)
β βββ src/
β β βββ index.js # Express app entry point
β β βββ db.js # Database init and schema
β β βββ seed.js # Demo data seeder
β β βββ middleware/
β β β βββ auth.js # JWT verification middleware
β β βββ routes/
β β βββ auth.js # /api/auth/*
β β βββ users.js # /api/users/*
β β βββ projects.js # /api/projects/*
β β βββ stats.js # /api/stats/*
β βββ .env.example
β βββ package.json
β
βββ frontend/
β βββ src/
β β βββ App.jsx # Route definitions
β β βββ main.jsx # React entry point
β β βββ index.css # Global styles and design tokens
β β βββ context/
β β β βββ AuthContext.jsx # Auth state and helpers
β β βββ components/
β β β βββ Layout.jsx # Sidebar + page wrapper
β β βββ pages/
β β β βββ Landing.jsx # Public landing page
β β β βββ Login.jsx
β β β βββ Register.jsx
β β β βββ Dashboard.jsx # Stats + charts + activity
β β β βββ Projects.jsx # Project table + CRUD
β β β βββ Profile.jsx # User profile + edit
β β βββ utils/
β β βββ api.js # Axios instance with auth interceptor
β βββ index.html
β βββ package.json
β
βββ .gitignore
βββ README.md
Create backend/.env from the example:
cp backend/.env.example backend/.env| Variable | Default | Description |
|---|---|---|
PORT |
5000 |
Backend server port |
JWT_SECRET |
change-this |
Secret key for signing JWT tokens |
FRONTEND_URL |
http://localhost:5173 |
Allowed CORS origin |
β οΈ Always changeJWT_SECRETto a long random string in production.
- SQLite over PostgreSQL β chosen intentionally for zero-setup simplicity. In production, swap
better-sqlite3forpgand updatedb.jsconnection logic. - No email verification β registration is instant with no email step.
- Avatar URLs only β profile pictures accept a URL string; file upload is not implemented.
- No real-time updates β data refreshes on page load or user action. WebSockets were out of scope.
- Single-node only β SQLite doesn't support horizontal scaling. A production version would use PostgreSQL with connection pooling.
- JWT stored in localStorage β acceptable for this scope; a production app would use httpOnly cookies.
# Build frontend
cd frontend
npm run build
# Output is in frontend/dist/ β deploy to Netlify, Vercel, or any static host
# Run backend in production
cd backend
NODE_ENV=production JWT_SECRET=your-long-random-secret npm startMIT β free to use for any purpose.



