Prerequisites
Install Node.js and npm
Brainbox requires Node.js 18 or higher and npm 10 or higher.
The project uses npm workspaces and is configured to use npm 10.9.0 as specified in
package.json.Install Docker and Docker Compose
Brainbox requires Docker for running infrastructure services (PostgreSQL, Redis, MinIO).Verify your installation:
Make sure Docker Desktop is running before proceeding with setup.
Installation
Install dependencies
Install all dependencies for the monorepo and workspaces:This will install dependencies for all apps and packages in the monorepo using npm workspaces.
Start infrastructure services
Start PostgreSQL, Redis (Valkey), and MinIO using Docker Compose:This starts the following services:
- PostgreSQL (port 5432) - Database with pgvector extension
- Valkey/Redis (port 6379) - Message queue and caching
- MinIO (ports 9000, 9001) - S3-compatible file storage
Use
docker compose -f hosting/docker/docker-compose.yaml logs to view service logs if you encounter issues.Verify Installation
Check that all infrastructure services are running:brainbox_postgresbrainbox_valkeybrainbox_minio
minioadmin / your_minio_password)
Troubleshooting
Database Connection Issues
If you encounter database connection issues, verify PostgreSQL is running:Port Conflicts
If ports 3000, 4000, 5432, 6379, 9000, or 9001 are already in use, you’ll need to either:- Stop the conflicting services
- Modify the port mappings in
hosting/docker/docker-compose.yaml
Build Failures
If you encounter build issues, try cleaning and reinstalling:Next Steps
Now that your environment is set up, you can:- Run the development servers
- Explore the project structure
- Start developing features