A modern task management application built with Next.js 15, React, TypeScript, and Prisma. TaskFlow is designed as an example project for testing AI enablement integrations and demonstrating modern web development best practices. The application features multi-user support, an intuitive drag-and-drop Kanban board interface, and comprehensive task management capabilities.
- Frontend: Next.js 15 App Router, React 19, TypeScript
- Database: Prisma ORM with PostgreSQL 16
- UI: shadcn/ui, Radix UI, Tailwind CSS 4
- Testing: Jest (unit tests), Playwright (E2E tests)
- Containerization: Docker & Docker Compose
Choose one of the following setup methods:
- Node.js 18 or higher
- PostgreSQL 16 or higher
This is the easiest way to get started with TaskFlow. The Dev Container provides a fully configured development environment with all dependencies pre-installed.
-
Clone the repository
git clone https://github.com/bitovi/taskflow cd taskflow -
Open in VS Code and start the Dev Container
- Open the folder in VS Code
- When prompted, click "Reopen in Container"
- Or use Command Palette (
Cmd/Ctrl + Shift + P): Dev Containers: Reopen in Container
-
Wait for automatic setup
The Dev Container will automatically:
- Start a PostgreSQL 16 container with the
taskflowdatabase - Install all Node.js dependencies
- Run the setup script which:
- Creates/verifies the database exists
- Runs Prisma migrations to set up the schema
- Clears any existing data
- Seeds the database with sample users and tasks
- Installs Playwright browser binaries for E2E testing
- Start the Next.js development server on port 3000
- Start a PostgreSQL 16 container with the
-
Access the application
Once the setup completes, VS Code will automatically open a preview of the application, or you can navigate to http://localhost:3000
What's included in the Dev Container:
- PostgreSQL 16 Alpine container (user:
taskflow, password:taskflow, database:taskflow) - Node.js 24 Alpine with development tools (bash, git, curl, PostgreSQL client)
- ESLint and Prettier extensions pre-configured
- Automatic port forwarding for the app (3000) and PostgreSQL (5432)
- Persistent PostgreSQL data volume
Use this method to run the production build with Docker Compose.
-
Clone the repository
git clone https://github.com/bitovi/taskflow cd taskflow -
Start the services
docker-compose up
This will:
- Start a PostgreSQL 16 container
- Build the production Docker image (using the root
Dockerfile) - Run database setup (migrations and seeding) during the build
- Start the optimized Next.js production server
- Make the app available at http://localhost:3000
Production Dockerfile details:
- Uses Node.js 24 Alpine for minimal image size
- Runs
npm cifor reproducible builds - Executes database setup:
npm run db:setup(creates database, runs migrations, seeds data) - Builds the Next.js application with optimizations
- Runs the production server with
npm run start
To rebuild after changes:
docker-compose down
docker-compose up --buildRun TaskFlow directly on your machine with a local PostgreSQL instance.
-
Clone the repository
git clone https://github.com/bitovi/taskflow cd taskflow -
Install PostgreSQL
Install PostgreSQL 16+ on your system:
- macOS: Postgres.app or
brew install postgresql@16 - Windows: PostgreSQL installer
- Linux: Use your package manager (e.g.,
apt install postgresql-16)
Start the PostgreSQL service after installation.
- macOS: Postgres.app or
-
Configure environment variables
Copy the example environment file and update it with your PostgreSQL connection details:
cp .env.example .env
Edit
.envand set theDATABASE_URL. Examples:For Postgres.app (macOS, no password):
DATABASE_URL="postgresql://localhost:5432/taskflow"
For PostgreSQL with username and password:
DATABASE_URL="postgresql://username:password@localhost:5432/taskflow"
Replace
usernameandpasswordwith your PostgreSQL credentials. The database name (taskflow) will be created automatically if it doesn't exist. -
Run the setup script
npm run setup
The setup script (
npm run setup) performs the following operations:- Install dependencies: Runs
npm installto install all Node.js packages - Create database: Runs
npm run db:createwhich:- Checks if the
taskflowdatabase exists - Creates the database if it doesn't exist
- Attempts to create the PostgreSQL user if specified in
DATABASE_URLand it doesn't exist - Handles various PostgreSQL authentication methods (peer, password, default user)
- Checks if the
- Run migrations: Executes
npx prisma db pushto create/update database tables - Reset data: Runs
npm run db:resetwhich:- Clears all existing data (
npm run db:clear) - Seeds the database with sample data (
npm run db:seed)
- Clears all existing data (
- Install test browsers: Runs
npx playwright install chromiumfor E2E tests
- Install dependencies: Runs
-
Start the development server
npm run dev
The application will be available at http://localhost:3000
TaskFlow uses environment variables for configuration. The repository includes an .env.example file with template values.
Copy the example file:
cp .env.example .envEnvironment variables:
DATABASE_URL: PostgreSQL connection string- Docker/Dev Container:
postgresql://taskflow:taskflow@postgres:5432/taskflow - Local (Postgres.app):
postgresql://localhost:5432/taskflow - Local (with auth):
postgresql://username:password@localhost:5432/taskflow
- Docker/Dev Container:
NODE_ENV: Environment mode (developmentorproduction)
Important: Never commit the .env file to version control. It's listed in .gitignore for security.
TaskFlow includes automated database management scripts:
npm run db:create- Creates thetaskflowdatabase if it doesn't exist (local development only; Docker creates this automatically)npm run db:setup- Complete database setup: create database, run migrations, and seed datanpm run db:clear- Removes all data from the databasenpm run db:seed- Populates the database with sample datanpm run db:reset- Clears and re-seeds the database
The seed script (prisma/seed.js) creates:
7 Sample Users:
- Alice Johnson (alice@example.com)
- Bob Smith (bob@example.com)
- Charlie Brown (charlie@example.com)
- Diana Prince (diana@example.com)
- Ethan Hunt (ethan@example.com)
- Fiona Green (fiona@example.com)
- George Wilson (george@example.com)
Password for all users: password123
30 Sample Tasks with:
- Random assignments to users
- Various statuses:
todo,in_progress,done,review - Different priorities:
low,medium,high - Random due dates (70% of tasks have due dates within the next 30 days)
- Realistic task names and descriptions
Example Login Credentials:
Email: alice@example.com
Password: password123
You can log in with any of the seeded users using their email and the password password123.
TaskFlow includes both unit tests (Jest) and end-to-end tests (Playwright).
Run unit tests with Jest and React Testing Library:
npm test # Run all unit tests
npm run test:watch # Run tests in watch modeUnit test files are located in:
tests/unit/- Test files for components, utilities, and actions- Coverage includes: UI components, utility functions, server actions, date helpers
Run E2E tests with Playwright:
npm run test:e2e # Run E2E tests headless
npm run test:e2e:headed # Run E2E tests with browser UIImportant: The development server must be running before executing E2E tests.
Running E2E tests (step-by-step):
-
Start the development server in one terminal:
npm run dev
-
Run E2E tests in another terminal:
npm run test:e2e
E2E test files are located in:
tests/e2e/- Test files for authentication, tasks, and Kanban board functionality- Tests use global setup/teardown scripts to manage test data
Playwright configuration:
- Browser: Chromium (Desktop Chrome)
- Base URL: http://localhost:3000
- Viewport: 1280x720
- Tests run sequentially (1 worker) to avoid database conflicts
- Traces captured on first retry for debugging
This project is licensed under the MIT License.
Note: This project is primarily used as an example application for testing AI enablement integrations and demonstrating best practices in modern web development.