A progressive Node.js framework for building efficient and scalable server-side applications.
TaskFlow is a project and task workspace with a Next.js frontend, NestJS API,
and PostgreSQL database. The frontend is served on port 3001 and the API on
port 3000.
For the full production deployment walkthrough, see DEPLOYMENT.md.
-
Copy
.env.docker.exampleto.env.docker. -
Replace the PostgreSQL password and both JWT secrets with unique random values. Use hexadecimal secrets so the database URL remains valid.
-
Build and start the complete stack:
docker compose --env-file .env.docker up --build -d
Compose waits for PostgreSQL, applies Prisma migrations, then starts the API and frontend.
-
Open http://localhost:3001, register an account, and sign in. The API documentation is at http://localhost:3000/api/docs.
Useful commands:
docker compose --env-file .env.docker logs -f
docker compose --env-file .env.docker downPostgreSQL data is stored in the taskflow_postgres_data volume and is
preserved when the containers are stopped. To remove the database volume as
well, run docker compose --env-file .env.docker down -v.
The root Dockerfile builds the frontend as a minimal Next.js standalone
image. backend/Dockerfile builds the API and provides a separate migration
target used by Compose. The API and database ports are bound to loopback by
default; adjust the compose port mappings deliberately when deploying beyond
local development.
Set the Vercel project root to frontend. Configure this environment variable
for Production (and Preview if those deployments need the API):
NEXT_PUBLIC_API_URL=https://<your-nest-api-service>.onrender.com
Use the API service origin only—do not add /health or /api. This variable
is embedded at build time, so redeploy Vercel after changing it.
Set NEXT_PUBLIC_SITE_URL to the public frontend origin when using a custom
domain. It is used for canonical metadata, the sitemap, and llms.txt; without
it, TaskFlow uses https://task-flow-app-black.vercel.app.
The Render URL previously used by the app,
https://taskflow-app-w4mm.onrender.com, is serving the Next.js frontend, not
the NestJS API: /health currently returns a Next.js 404. Create a separate
Render Web Service from this repository with Root Directory backend,
Build Command npm ci --include=dev && npm run build, Start Command
npm run db:migrate:deploy && npm run start:prod, and Health Check Path
/health. Add these environment variables to that API service:
| Variable | Value |
|---|---|
NODE_ENV |
production |
FRONTEND_URL |
https://task-flow-app-delta-one.vercel.app |
DATABASE_URL |
Render PostgreSQL internal URL (or your PostgreSQL connection URL) |
JWT_ACCESS_SECRET |
A unique random secret of at least 32 characters |
JWT_REFRESH_SECRET |
A different unique random secret of at least 32 characters |
Render supplies PORT. Keep the database URL and JWT secrets private. Once
the API is deployed, verify that
https://<your-nest-api-service>.onrender.com/health returns JSON with
"status":"ok". Then set that service URL in Vercel as
NEXT_PUBLIC_API_URL and redeploy. FRONTEND_URL must match the Vercel origin
exactly. Add custom origins as comma-separated URLs; for changing Vercel
preview URLs, use a narrowly scoped wildcard such as
https://task-flow-*-pratik-dhandares-projects-ce46116e.vercel.app. Keep the
project/team suffix exact; do not allow all of *.vercel.app.
Because Vercel and Render use different sites, the production refresh cookie
uses SameSite=None; Secure. Browsers that block third-party cookies may
restrict refresh-token persistence; custom frontend and API hostnames under
the same site are the most reliable long-term setup.
GitHub issue and pull-request linking uses a GitHub App. Create an App and set
its Setup URL to
https://<your-api-service>.onrender.com/integrations/github/callback. Enable
Redirect on update so GitHub returns to TaskFlow after repository access is
saved for an existing installation. Set its webhook URL to
https://<your-api-service>.onrender.com/integrations/github/webhook.
Subscribe to installation, pull_request, pull_request_review, and
check_suite events. Grant read-only repository metadata, issues, pull
requests, and checks permissions.
Add these secrets to the Render API service (never to Vercel or source control):
| Variable | Value |
|---|---|
GITHUB_APP_ID |
GitHub App ID |
GITHUB_APP_SLUG |
App slug from its GitHub URL |
GITHUB_APP_PRIVATE_KEY |
Contents of the App's downloaded private key |
GITHUB_APP_WEBHOOK_SECRET |
A secret of at least 32 characters, matching the GitHub App webhook secret |
Set all four variables together and redeploy. Until configured, GitHub controls
remain disabled. Project owners/admins can install the App for a project,
select repositories, browse/search open issues, and add an issue as a project
task. Pull requests link automatically when their title or branch includes
taskflow:<task-id> or when they close an issue already linked to a task.
TaskFlow shows pull-request review and check status, moves tasks to In progress
when a linked pull request opens, and sends notifications for review requests,
failed checks, and blocked tasks. The dashboard includes assigned and blocked
work, pull requests awaiting review, and recent merges. Owners/admins can also
disconnect GitHub from a project; this pauses syncing but keeps existing task
links visible and does not uninstall the GitHub App. Projects may opt into
moving linked tasks to Done when a PR is merged.
Project invitations are in-app only: invited collaborators must already have a TaskFlow account, and they join after accepting the invitation from their notifications. Task comments support replies and project-member mentions.
The easiest way to start the API, PostgreSQL, and frontend together is the Docker Compose flow above. For separate development servers, start PostgreSQL, then run these commands in separate terminals from the repository root:
Set-Location .\backend
npm ci
npm run db:generate
npm run start:devSet-Location .\frontend
npm ci
npm run dev -- --port 3001Backend checks (run from backend/):
npm run build
npm run lint
npm test
npm run test:e2eFrontend checks (run from frontend/):
npm run lint
npm run buildFor production deployment, follow DEPLOYMENT.md.
In production applications, observability is essential for understanding how your system behaves, detecting issues early, and maintaining reliable performance.
NestJS Observe automatically instruments your NestJS application, giving you deep visibility into your system with minimal setup:
- Distributed tracing: Follow requests across services and understand how they flow through your system.
- Waterfall analysis: Visualize request execution and identify slow operations, bottlenecks, and unexpected delays.
- Performance analysis: Analyze application performance in real time and quickly pinpoint areas that need optimization.
- Metrics: Track key application and infrastructure metrics to understand system health and performance trends.
- Logging: Centralize and correlate logs with traces and other telemetry to make debugging easier.
- Error tracking: Detect errors quickly and investigate their root causes with the surrounding context.
- SLA monitoring: Track service-level objectives and identify when your application is approaching or exceeding defined thresholds.
- Alarms and alerts: Set up alerts for critical errors, performance degradation, SLA violations, and other anomalies so your team can react quickly.
This project is already instrumented. To connect it, run this and approve the code it prints at observe.nestjs.com/link - signing up for free if you have no account:
$ npx @nestjs/observe linkIt writes the app key and secret into .env and makes every nest start script (start, start:dev, start:debug) load it. In production, set OBSERVE_APP_KEY and OBSERVE_APP_SECRET in the environment instead.
Or do it by hand: create an application and an API key at observe.nestjs.com, and set the pair as OBSERVE_APP_KEY and OBSERVE_APP_SECRET in the environment the app runs in.
The free plan needs no payment details and covers 300,000 events a month. You can also browse the live demo first - the whole dashboard over a busy service's data, with nothing to install.
Check out a few resources that may come in handy when working with NestJS:
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
- Auto-instrument your application with NestJS Observe. Distributed tracing, metrics, and logging made easy. Error tracking and performance monitoring for your NestJS applications.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
- Looking for a job, or have a job to offer? Check out our official Jobs board.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.