This guide will help you run the GDG Attendees application locally in development mode.
- Node.js (v18 or higher) - Download here
- Go (v1.19 or higher) - Download here
- Git - Download here
- VS Code with Angular and Go extensions
- Postman or Insomnia for API testing
# From the root directory
./dev-setup.sh# Navigate to API directory
cd api
# Install dependencies
go mod download
# Run the API server
go run main.goThe API will be available at: http://localhost:3000
# Navigate to web directory
cd web
# Install dependencies
npm install
# Start development server
npm run devThe web app will be available at: http://localhost:4200
We've created convenient scripts to make development easier:
./dev-setup.sh- Complete setup and start both services./dev-start.sh- Start both API and Web in development mode./dev-stop.sh- Stop all development services./dev-test.sh- Run tests for both services
go run main.go- Start API servergo test ./...- Run testsgo mod tidy- Clean up dependencies
npm run dev- Start development server with hot reloadnpm run start- Start development servernpm run build- Build for productionnpm run test- Run unit testsnpm run watch- Build and watch for changes
| Service | URL | Description |
|---|---|---|
| Web App | http://localhost:4200 | Angular frontend |
| API | http://localhost:3000 | Go backend API |
| API Health | http://localhost:3000/health | Health check endpoint |
| API Docs | http://localhost:3000/api/v1 | API endpoints |
attendees-app/
βββ π api/ # Go backend
β βββ main.go # Entry point
β βββ go.mod # Go dependencies
β βββ app/ # Application logic
β β βββ app.go # Main app configuration
β β βββ handler/ # HTTP handlers
β βββ Dockerfile # Docker configuration
β
βββ π web/ # Angular frontend
β βββ package.json # Node.js dependencies
β βββ angular.json # Angular configuration
β βββ src/ # Source code
β β βββ app/ # Angular components
β β βββ environments/ # Environment configs
β β βββ assets/ # Static assets
β βββ Dockerfile # Docker configuration
β
βββ ποΈ infra/ # Infrastructure
β βββ k8s/ # Kubernetes manifests
β
βββ π Development files
βββ dev-setup.sh # Setup script
βββ dev-start.sh # Start script
βββ README.md # This file
Create a .env file in the /api directory (optional):
PORT=3000
GIN_MODE=debug
CORS_ALLOWED_ORIGINS=http://localhost:4200
LOG_LEVEL=debugThe Angular app uses environment files:
src/environments/environment.ts- Default (development)src/environments/environment.dev.ts- Developmentsrc/environments/environment.prod.ts- Production
cd api
go test ./...cd web
npm run test# Start both services first
./dev-start.sh
# Then run E2E tests (if configured)
cd web
npm run e2e# Find process using port 3000 (API)
lsof -i :3000
kill -9 <PID>
# Find process using port 4200 (Web)
lsof -i :4200
kill -9 <PID>cd web
rm -rf node_modules package-lock.json
npm installcd api
go clean -modcache
go mod downloadMake sure the API is configured to allow requests from http://localhost:4200
The Go API provides structured logging. Check the console for:
- Request logs
- Error messages
- Performance metrics
Angular CLI provides:
- Hot reload on file changes
- Build error reporting
- Lint warnings
- Start development servers:
./dev-start.sh - Make changes to code
- Test changes automatically (hot reload)
- Test API endpoints with Postman/curl
- Run tests before committing
- Build for production when ready
- API: Add new handlers in
/api/app/handler/ - Web: Add new components in
/web/src/app/ - Update tests for new functionality
- Update documentation
When ready to deploy:
# Build production images
docker build -t gdg-attendees-api ./api
docker build -t attendees-app ./web
# Deploy to Kubernetes
cd infra/k8s
make deploy- Angular Documentation
- Go Fiber Documentation
- Go Documentation
- Docker Documentation
- Kubernetes Documentation
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Happy coding! π