Development Mode
The development environment runs with hot-reloading enabled for both frontend and backend changes.Starting the Development Server
To run the complete application in development mode:- Frontend (Jabulani): Vite dev server + Tailwind CSS watcher
- Frontend (Tango): Vite dev server + Tailwind CSS watcher
- Backend: Air with hot-reloading
- Database: PostgreSQL container
- Reverse Proxy: Caddy server
The
make run command uses make -j 7 to run 7 processes concurrently. You’ll see output from all processes in your terminal.Development Processes
Each component can also be run individually for debugging:Hot Reloading Configuration
The backend uses Air for hot-reloading. Configuration is in.air.toml:
.air.toml
- Watches all
.gofiles in thebackenddirectory - Rebuilds on file changes with 1 second delay
- Excludes irrelevant directories
- Logs build errors to
build-errors.log
Tailwind CSS Compilation
Tailwind CSS is compiled separately for each frontend app:Production Build
To build the application for production deployment:Build Output
After a successful build:- Backend Binary:
backend/bin/reservations(orreservations.exeon Windows) - Frontend Bundles: Built by Vite in each app’s build directory
- Email Templates:
backend/emails/out/ - CSS: Minified Tailwind CSS in each app’s
src/output.css
Email Template Development
During development, you can preview and develop email templates:Testing
Run the test suite for both frontend and backend:Linting
Run linters for code quality:Platform-Specific Differences
The Makefile handles platform differences automatically:Windows
- Executable extension:
.exe - Path separator:
\ - Air command adjusts binary path accordingly
Linux/macOS
- No executable extension
- Path separator:
/ - Standard Unix paths
Troubleshooting
Build Fails on Windows
Ensure you’re using a proper Unix-like shell (Git Bash, WSL) or adjust the Makefile for cmd.exe/PowerShell.Port Conflicts
If development servers fail to start, check for port conflicts:Air Not Rebuilding
Checkbuild-errors.log for compilation errors: