FocusHub is a full-stack productivity app with authentication and a Kanban-style board for managing tasks across To Do, In Progress, and Done columns.
Frontend:
- React 19
- Vite 7
- Tailwind CSS 4
- React Router 7
- Radix UI
Backend:
- Node.js + Express 5
- TypeScript
- MongoDB + Mongoose
- JWT authentication
FocusHub/
├── frontend/ # React app
└── backend/ # Express API (TypeScript)
- Node.js 18+
- npm
- MongoDB Atlas URI (or local MongoDB)
From backend:
npm installCreate backend/.env:
PORT=3000
DB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net
JWT_SECRET_KEY=<your_secret_here>Run development server:
npm run devBuild + run production build:
npm run build
npm startFrom frontend:
npm install
npm run devBuild and preview:
npm run build
npm run previewBackend (backend/package.json):
npm run dev-> runssrc/index.tswith ts-nodenpm run build-> compiles TypeScript todist/npm start-> runsdist/index.js
Frontend (frontend/package.json):
npm run dev-> starts Vite dev servernpm run build-> builds for productionnpm run lint-> runs ESLintnpm run preview-> previews production build
Authentication and profile:
POST /registerPOST /loginPUT /me(auth required)
Board and tasks:
GET /board(auth required)POST /tasks(auth required)PATCH /tasks/:id(auth required)PATCH /tasks/:id/move(auth required)DELETE /tasks/:id(auth required)
Health:
GET /
Use these settings:
- Root Directory:
backend - Build Command:
npm install && npm run build - Start Command:
npm start
If you see this error:
Cannot find module '/opt/render/project/src/index.js'
it means Render is running from the wrong directory or using the wrong start command.
Deploy frontend to Vercel, Netlify, or Render static hosting.
Build settings:
- Root Directory:
frontend - Build Command:
npm run build - Publish Directory:
dist
Frontend currently uses hardcoded http://localhost:3000 API URLs in several files. For production, switch to an environment-based API base URL (for example, VITE_API_BASE_URL) and consume it in one shared config.
- Move frontend API URL configuration to environment variables.
- Add centralized API client for consistent error handling.
- Add test coverage for auth and task endpoints.
- Add a root
LICENSEfile for project-wide licensing clarity.