Overview
This guide will walk you through starting ARCA and accessing the application for the first time. If you haven’t installed ARCA yet, please follow the Installation Guide first.Make sure you’ve completed all installation steps, including database setup and migrations, before proceeding.
Starting the Development Servers
Start Both Applications
From the project root directory, start both the backend and frontend simultaneously:This command uses
concurrently to run both servers in parallel:- Backend runs on port
3333(magenta output) - Frontend runs on port
3000(cyan output)
The first start may take longer as Next.js compiles pages and Turbopack optimizes the build.
Alternative: Start Applications Separately
You can also run the backend and frontend in separate terminal windows for better log visibility:Running servers separately is useful when debugging specific issues or when you only need to work on one part of the application.
First Login
Use Default Credentials
If you’ve run the database seed (automatically executed during
prisma migrate dev), you should have default users created.Check your backend seed file for default credentials, or create a new user through the registration flow if available.Explore the Dashboard
After logging in, you’ll have access to:
- Patient Management - View and create patient records
- Waitlist - Manage candidates awaiting treatment
- Appointments - Schedule and track consultations
- Documents - Upload and manage clinical documents
- Reports - Generate discharge and progress reports
- Audit Logs - View system activity (supervisor role)
Database Management
ARCA includes Prisma Studio for visual database management:http://localhost:5555 and allows you to:
View Data
Browse all tables and records in your database
Edit Records
Modify data directly through the web interface
Create Entries
Add new users, patients, or appointments
Inspect Schema
Explore relationships and constraints
Available Scripts
ARCA provides several npm scripts for different tasks:Development
Build
- Builds the NestJS backend to
apps/backend/dist/ - Builds the Next.js frontend to
apps/frontend/.next/ - Uses Turborepo caching for faster subsequent builds
Code Quality
Database Operations
Understanding the Monorepo
ARCA uses Turborepo to manage the monorepo efficiently:Workspace Structure
Turborepo Benefits
Caching
Builds are cached and reused across runs
Parallelization
Tasks run in parallel when possible
Dependency Graph
Automatic task ordering based on dependencies
Remote Caching
Share cache across team members (configurable)
Turborepo Tasks
Theturbo.json configuration defines these tasks:
build- Production builds with cachinglint- Code linting across workspacescheck-types- TypeScript validationdev- Development mode (cache disabled for live reloading)
API Testing
You can test the backend API using tools like cURL, Postman, or HTTPie:Most endpoints require JWT authentication. Include the token in the Authorization header:
Bearer <token>Hot Reload
Both applications support hot reload during development:- Backend: NestJS watches for file changes and automatically restarts
- Frontend: Next.js with Turbopack provides instant HMR (Hot Module Replacement)
Stopping the Servers
To stop the development servers:- Press
Ctrl+Cin the terminal runningnpm run dev - Wait for both processes to terminate gracefully
Next Steps
Now that ARCA is running, you can:API Reference
Explore the complete REST API documentation
Configuration
Configure authentication, database, and deployment
Patient Management
Learn how to manage patient records
Deployment
Deploy ARCA to production
Troubleshooting
Port already in use
Port already in use
If you see “Port 3000 (or 3333) is already in use”:
Database connection failed
Database connection failed
Verify PostgreSQL is running and DATABASE_URL is correct:Ensure the database exists and credentials match
apps/backend/.env.Module not found errors
Module not found errors
Reinstall dependencies and regenerate Prisma Client:
Frontend shows API errors
Frontend shows API errors
Ensure:
- Backend is running on port 3333
- Frontend API URL is correctly configured
- CORS is properly configured in the backend
- JWT_SECRET matches between backend .env and frontend config
For additional help, check the project README or open an issue on GitHub.