- Node.js v20+
- npm 9+
- Docker and Docker Compose
git clone https://github.com/Abimael10/workhub-app.git
cd workhub-app
cp .env.example.local .env.local
npm install- Start services:
docker compose -f docker-compose.local.yml up -d db minio minio-setup redis web
# Or use: make dev-up- Stop services:
make dev-down- Configure database (
Note: make sure to run this once for your environment, otherwise you will not be able to register to continue exploring the application):
npm run db:push- Start the app (
NOTE: not needed if thewebimage is already running):
npm run dev # http://localhost:3000- Create an account at http://localhost:3000/register
-
Multi-tenant organizations: Data isolation per organization. Users can belong to an organization, invite existing users, and members/admins can update org projects, clients, and files.
-
Multi-organization switching: A user can belong to multiple orgs and switch from their profile with one click to manage projects, clients, and files for that org.
-
Kanban board: Visual project management with drag and drop for status changes. Members, admins, and owners can manage org projects.
-
Client management: Register and manage clients shared across an organization.
-
File storage: Upload and manage files shared by org users.
-
Authentication: NextAuth.js for registration and login.
npm run dev # Development server
npm run build # Build for production
npm run start # Start production server
npm run test # Unit/integration tests
npm run test:e2e # Automated E2E tests (some tests are running correctly, needed to refactor some as a TODO)
npm run lint # Lint codebase
npm run db:push # Apply database schemaWhen running the application locally, you can use the following commands to observe the services:
Connect to the PostgreSQL database running in Docker:
# Using the Makefile command
make db-shell
# Or directly with Docker
docker exec -it workhub-postgres psql -U postgres -d workhub
# List all tables
\dt
# Describe a table
\d table_name
# Query data from a table
SELECT * FROM users LIMIT 10;View logs for all services or specific services:
# View logs for all services
make dev-logs
# View logs for specific service
docker logs workhub-postgres # PostgreSQL logs
docker logs workhub-web # Web application logs
docker logs workhub-minio # MinIO storage logs
docker logs workhub-redis # Redis logs
# Follow logs in real-time
docker logs -f workhub-webAccess the MinIO storage container:
# Using the Makefile command
make minio-shell
# Or directly with Docker
docker exec -it workhub-minio /bin/sh
# Access MinIO web console at http://localhost:9001
# Credentials: local-minio / local-minio-secretConnect to the Redis instance:
# Connect to Redis CLI
docker exec -it workhub-redis redis-cli
# View all keys
KEYS *
# Get value of a specific key
GET key_namenpm run test:e2e # Run all tests
npx playwright test --headed # Visible browser mode
npx playwright test --ui # Playwright UI runner- Drizzle schema lives in
src/server/db/schemaand generates SQL underdrizzle/. - The
accountstable comes from NextAuth to support optional OAuth/OIDC providers; with email/password-only flows it stays empty. Token columns are plaintextfields—add encryption/rotation if enabling external providers. - Apply schema changes with
npm run db:pushafter updating the Drizzle models; review generated SQL before committing.
- Because this was built under time constraints, you may find some partial patterns that weren’t fully refactored. Functionality was prioritized over optimization.
When building the application, ensure that NEXTAUTH_URL and NEXT_PUBLIC_APP_URL environment variables are set to valid URLs, otherwise the build will fail during page data collection.