Quickstart Guide
Get Your Finance App up and running on your local machine in just a few steps. This guide will take you from zero to a fully functioning API.Estimated time: 10-15 minutes
Prerequisites
Before you begin, make sure you have:- Node.js v18+ installed (download here)
- Git installed
- A Supabase account (free tier is fine - sign up here)
- A terminal/command line interface
Check Node.js version
Verify you have Node.js v18 or higher installed:If you need to install or update Node.js, visit nodejs.org
Install pnpm
Install pnpm globally - it’s a faster, more efficient package manager:Verify the installation:
Why pnpm? It’s faster than npm, saves disk space, and has built-in monorepo support.
Set up Supabase
Supabase provides free PostgreSQL hosting. Set it up:
- Go to supabase.com and sign in
- Click “New Project”
- Fill in the details:
- Name:
your-finance-app - Database Password: Choose a strong password and save it
- Region: Select the closest to you
- Plan: Free
- Name:
- Click “Create new project” and wait ~2 minutes
- Go to Settings → Database
- Find Connection string section
- Select URI mode
- Copy both connection strings:
- Transaction mode (port 6543) - for application queries
- Session mode (port 5432) - for migrations
Configure environment variables
Copy the example environment file and edit it:Open Generate a secure JWT secret:Copy the output and use it as your
apps/backend/.env in your editor and update these values:JWT_SECRET.Replace
xxxxx with your Supabase project ID and YOUR_PASSWORD with your database password.Install dependencies
Install all project dependencies:This will install dependencies for the entire monorepo. It typically takes 1-3 minutes depending on your internet connection.
pnpm creates symlinks between workspace packages, making installation faster and more efficient.
Run database migrations
Set up your database schema by running migrations:What this does:Verify in Supabase:
prisma generatecreates the TypeScript Prisma Clientprisma migrate deploycreates the database tables
- Go to your Supabase project → Table Editor
- You should see tables:
users,transactions,categories
Start the development server
Launch the application:You should see:
The server is now running at
http://localhost:3000Test the API
Verify everything works by testing the endpoints.You should see: Expected response:Expected response:Expected response:
Test the health check:
Open your browser and visit:"Hello World!"Register a new user:
Create a transaction:
Save the token from the registration response:Check your balance:
You can also use tools like Postman or Thunder Client (VS Code extension) to test the API.
What’s Next?
Congratulations! You now have Your Finance App running locally. Here’s what to explore next:Setup Guide
Learn detailed configuration and troubleshooting
API Reference
Explore all available endpoints
Architecture
Understand how the application is structured
Database Schema
Learn about the data models
Useful Commands
Here are some common commands you’ll use during development:Troubleshooting
Error: Cannot find module '@nestjs/core'
Error: Cannot find module '@nestjs/core'
Solution: Dependencies weren’t installed properly.
Error: Environment variable not found: DATABASE_URL
Error: Environment variable not found: DATABASE_URL
Solution: The
.env file is missing or incorrect.- Make sure
.envexists inapps/backend/ - Verify it contains
DATABASE_URLandDIRECT_URL - Restart the server
Error: connect ECONNREFUSED or connection timeout
Error: connect ECONNREFUSED or connection timeout
Solution: Database connection issue.
- Verify your Supabase connection strings are correct
- Check that your database password matches
- Ensure there are no extra spaces in
.env - Confirm your Supabase project is active
Error: Port 3000 is already in use
Error: Port 3000 is already in use
Solution: Another process is using port 3000.Find and kill the process:Or change the port in
apps/backend/src/main.ts:Quick Reference
Project Structure
Available Scripts
| Command | Description |
|---|---|
pnpm dev:backend | Start development server |
pnpm run build | Build for production |
pnpm run start:prod | Run production build |
pnpm run format | Format code with Prettier |
pnpm run lint | Lint code with ESLint |
npx prisma studio | Open database GUI |
npx prisma migrate dev | Create new migration |
Need More Help?
For detailed setup instructions, configuration options, and troubleshooting, check out the Setup Guide.Detailed Setup Guide
Complete installation guide with advanced configuration
