Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Novu β€” Full-Stack Project Dashboard

A full-stack dashboard for managing projects, tracking progress, and collaborating with your team.

πŸš€ Live Demo Β· πŸ“Έ Screenshots Β· ⚑ Quick Start Β· πŸ“‘ API Docs


Dashboard Preview


✨ Features

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

πŸ–₯️ Screenshots

πŸ“Œ To add screenshots: take them after running the app, upload them to docs/screenshots/ in your repo, then update the image paths below.

Landing Page

Landing Page

Dashboard

Dashboard

Projects

Projects

Profile

Profile


πŸ› οΈ Tech Stack

Frontend

  • 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

Backend

  • Node.js + Express β€” REST API server
  • SQLite via better-sqlite3 β€” embedded database, zero setup
  • JWT β€” stateless authentication
  • bcryptjs β€” password hashing
  • dotenv β€” environment config

⚑ Quick Start

Prerequisites

  • Node.js v18 or higher
  • npm v8+

1. Clone the repository

git clone https://github.com/Hamzaa6296/dashboard.git
cd dashboard

2. Set up the backend

cd backend
cp .env.example .env
npm install

Create the data directory if it doesn't exist:

mkdir data

Seed demo data (recommended for first run):

node src/seed.js

Start the backend server:

npm run dev

βœ… Backend running at http://localhost:5000

3. Set up the frontend

Open a new terminal:

cd frontend
npm install
npm run dev

βœ… Frontend running at http://localhost:5173

4. Open in browser

Go to http://localhost:5173


πŸ”‘ Demo Accounts

After running the seed script, use these to log in instantly:

Email 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.


πŸ“‘ API Endpoints

Base URL: http://localhost:5000/api

All protected routes require the header:

Authorization: Bearer <token>

πŸ” Auth

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

πŸ“ Projects

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)

πŸ‘€ Users

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

πŸ“Š Stats

Method Endpoint Auth Description
GET /stats/dashboard βœ… Totals, chart data, recent activity

Health Check

GET /api/health
# β†’ { "status": "ok", "timestamp": "..." }

πŸ—‚οΈ Project Structure

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

βš™οΈ Environment Variables

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 change JWT_SECRET to a long random string in production.


πŸ“ Assumptions & Limitations

  • SQLite over PostgreSQL β€” chosen intentionally for zero-setup simplicity. In production, swap better-sqlite3 for pg and update db.js connection 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.

πŸš€ Production Build

# 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 start

πŸ“„ License

MIT β€” free to use for any purpose.


Built with React Β· Express Β· SQLite

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages