A production-ready task manager application with user authentication, built with React and Node.js.
- π User authentication (Login/Register)
- π Admin functionality (first user becomes admin)
- βοΈ Database-backed settings management
- β Create, read, update, and delete tasks
- π― Task priorities (Low, Medium, High)
- π Task status tracking (Pending, In Progress, Completed)
- π Filter tasks by status
- πΎ SQLite database for data persistence
- π³ Docker support with docker-compose
- π¨ Beautiful and responsive UI
- π₯ Health check endpoint
Frontend:
- React 18
- Vite
- Axios
- Modern CSS
Backend:
- Node.js
- Express
- SQLite (better-sqlite3)
- JWT for authentication
- bcryptjs for password hashing
The easiest way to run this application is using Docker. The app will be fully operational in under 2 minutes.
- Docker and Docker Compose installed
- Clone the repository
- Navigate to the project directory
- Run the application:
docker-compose up -dThat's it! The application will be available at http://localhost:8080
The first user to register will automatically become the admin.
# Check if the container is running
docker-compose ps
# Check application health
curl http://localhost:8080/health
# View logs
docker-compose logs -fdocker-compose downAll data (users, tasks, settings) is persisted in a Docker volume and will survive container restarts.
To completely remove all data:
docker-compose down -vIf you want to run the application in development mode:
- Node.js (v16 or higher)
- npm
- Install all dependencies:
npm run install-allThis will install dependencies for the root, backend, and frontend.
- Start both backend and frontend servers:
npm run devThis will start:
- Backend server on
http://localhost:5000 - Frontend server on
http://localhost:3000
If you prefer to run the servers separately:
Backend:
cd backend
npm run devFrontend:
cd frontend
npm run dev- Open your browser and go to
http://localhost:8080(Docker) orhttp://localhost:3000(Dev) - Create a new account by clicking "Sign Up" (first user becomes admin)
- Log in with your credentials
- Start managing your tasks!
- Admin users can access Settings page to manage system configuration
The first user to register automatically becomes the admin. Admin users can:
- Access the Settings page via the "Settings" button in the header
- View and manage all system settings
- Add, update, and delete configuration values
- Control features like registration allowance, session timeout, etc.
All system configuration is stored in the database, not in environment variables (except for database connection and JWT secret).
POST /api/auth/register- Register a new userPOST /api/auth/login- Login user
GET /api/tasks- Get all tasks for the logged-in userGET /api/tasks/:id- Get a specific taskPOST /api/tasks- Create a new taskPUT /api/tasks/:id- Update a taskDELETE /api/tasks/:id- Delete a task
testapp2/
βββ backend/
β βββ middleware/
β β βββ auth.js
β βββ routes/
β β βββ auth.js
β β βββ tasks.js
β βββ database.js
β βββ server.js
β βββ package.json
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ Login.jsx
β β β βββ TaskManager.jsx
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β βββ index.html
β βββ package.json
βββ package.json
The application requires the following environment variables (already configured in docker-compose.yml):
PORT- Port to run the application on (default: 8080)DATABASE_URL- SQLite database path (default: sqlite:///app/data/tasks.db)JWT_SECRET- Secret key for JWT token generation (change in production!)NODE_ENV- Environment mode (development/production)
The application exposes a health check endpoint at /health that returns:
{"status": "healthy"}This is used by Docker and orchestration systems to monitor application health.
- Passwords are hashed using bcryptjs
- JWT tokens are used for authentication
- Protected routes require valid JWT token
- First user automatically becomes admin
- Admin can manage system settings through the database-backed Settings page
- Important: Change the JWT_SECRET in production!
The project includes a GitHub Actions workflow for deployment to Google Kubernetes Engine (GKE). See .github/workflows/deploy-to-gke.yaml for configuration.
MIT