Prerequisites
Before setting up the development environment, ensure you have:- Node.js: Version 18.0 or later
- Bun: Version 1.0 or later (recommended package manager)
- Docker & Docker Compose: Version 24.0+ with Compose V2
- Git: Version 2.25+
- VS Code or another IDE with TypeScript support
System Requirements
- RAM: 8GB minimum (16GB recommended)
- CPU: 4+ cores
- Storage: 20GB free space
- OS: macOS, Linux, or Windows with WSL2
Repository Setup
Clone and Initialize
Environment Configuration
Development Workflow
Starting Development Services
Service URLs (Development)
- GeoFlow App: http://localhost:3000
- Convex Dashboard: http://localhost:6791
- Motia Dashboard: http://localhost:4010
- MCP Server: http://localhost:8000
- PostgreSQL: localhost:5432
Project Structure
Monorepo Layout
Key Directories
- apps/geoflow/src/: Frontend application code
- apps/backend/convex/: Backend queries, mutations, actions
- packages/worker/src/: Point cloud processing logic
- apps/motia/steps/: Workflow step definitions
Development Tasks
Frontend Development
Backend Development
Worker Development
Motia Development
Code Quality
Linting and Formatting
Testing
Pre-commit Hooks
The project uses Biome for code quality. Pre-commit hooks are configured to:- Run linting on staged files
- Format code automatically
- Run type checking
- Execute relevant tests
Database Development
Schema Changes
HTTP Endpoints
Testing Strategies
Unit Tests
Integration Tests
E2E Tests
Debugging
Frontend Debugging
Backend Debugging
Docker Debugging
Performance Monitoring
Frontend Performance
Backend Performance
System Performance
Contributing Guidelines
Code Style
- Use TypeScript for all new code
- Follow existing naming conventions
- Use descriptive variable and function names
- Add JSDoc comments for public APIs
Git Workflow
Pull Request Process
- Ensure all tests pass
- Update documentation if needed
- Add migration files for schema changes
- Get code review approval
- Merge to main branch
Troubleshooting
Common Issues
Port conflicts: Change ports in docker-compose.yml or stop conflicting services Node version issues: Use nvm to manage Node.js versions Permission errors: Ensure proper file permissions for storage directories Database connection issues: Check POSTGRES_PASSWORD and container networkingGetting Help
- Check existing issues on GitHub
- Review service logs:
docker compose logs - Test with minimal reproduction case
- Ask in development discussions