Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js 18+
Download from nodejs.org
pnpm 9.0.0
Install with
npm install -g [email protected]MongoDB
Local instance or MongoDB Atlas
Git
For version control and cloning the repository
Installation
Install dependencies
Install all dependencies for the entire monorepo using pnpm:
The monorepo uses pnpm workspaces. Make sure you’re using pnpm 9.0.0 as specified in package.json.
Run development servers
Start all applications in development mode:Or run individual applications:Access at http://localhost:3000
- CashGap
- SecureVault
- Web
When running individual apps, they will all use port 3000 by default. Only run one at a time or modify the port in package.json.
Verify Installation
After starting the development servers, verify everything is working:Check CashGap
Check CashGap
- Navigate to http://localhost:3000
- You should see the CashGap landing page
- Click “Get Started” to create an account
- Fill in the registration form and verify your email
- Log in and explore the dashboard
Check SecureVault
Check SecureVault
- Navigate to http://localhost:3000 (if running SecureVault)
- You should see the SecureVault landing page
- Register for a new account
- Log in and access the password vault
- Try adding a new password entry
Verify Database Connection
Verify Database Connection
Check that MongoDB is connected:
Available Scripts
The monorepo includes several useful scripts:| Script | Description |
|---|---|
pnpm dev | Start all apps in development mode |
pnpm build | Build all apps for production |
pnpm lint | Run ESLint on all packages |
pnpm format | Format code with Prettier |
pnpm check-types | Run TypeScript type checking |
Using Turbo Filters
Run commands for specific apps or packages:Building for Production
Build all applications
Set production environment variables
Update your
.env.local files with production values:- Use production MongoDB URI
- Set strong AUTH_SECRET values
- Configure production OAuth credentials
- Set up production SMTP settings
Working with Shared Packages
The monorepo includes shared packages that can be used across applications:Using @repo/ui Components
Using @repo/auth
Troubleshooting
Port Already in Use
Port Already in Use
If you see
Error: Port 3000 is already in use:-
Kill the process using the port:
-
Or change the port in package.json:
Database Connection Failed
Database Connection Failed
If MongoDB connection fails:
-
Verify MongoDB is running:
-
Check your MONGODB_URI in
.env.local - Ensure the database name doesn’t contain special characters
- For Atlas, verify your IP is whitelisted
Build Failures
Build Failures
If builds fail:
-
Clear Turbo cache:
-
Clear node_modules and reinstall:
-
Clear Next.js cache:
-
Rebuild:
Type Errors
Type Errors
If you encounter TypeScript errors:
-
Run type checking:
-
Ensure all dependencies are installed:
- Check that you’re using TypeScript 5.9.2 (specified in package.json)
Next Steps
Now that you have the Money monorepo running, explore the documentation:Monorepo Structure
Understand the organization and architecture of the project
CashGap Guide
Learn about the personal finance management app
SecureVault Guide
Explore the password manager features
Development Setup
Set up your development environment in detail