Welcome to the Snapp Project 🎉
This document defines how all contributors should develop, collaborate, and maintain the ecosystem of Snapp, Map, Food, and supporting services.
The project is divided into hubs. Each hub is a GitHub repo under the snapp-map organization.
Microservices live as separate repos and are added as submodules into the hub repo.
snapp-map/
├── snapp-hub/ # Taxi & parcel platform │ ├── snapp-user-service
│ ├── snapp-driver-service
│ ├── snapp-trip-service
│ └── ...
│
├── map-hub/ # Routing & geolocation platform │ ├── map-routing-service
│ ├── map-traffic-service
│ └── ...
│
├── food-hub/ # Marketplace platform │ ├── food-store-service
│ ├── food-order-service
│ └── ...
│
├── bank-service/ # Banking mini-program
├── email-service/ # Email mini-program
└── contracts/ # Shared API specs (OpenAPI, gRPC, schemas)We use GitHub Flow with clear rules:
-
main→ Stable production-ready code. -
dev→ Integration branch for new features. -
feature/<name>→ Feature work (e.g.,feature/trip-matching). -
hotfix/<name>→ Quick fixes for production issues.
-
Create a branch from
dev. -
Commit changes (small, frequent commits preferred).
-
Open a Pull Request (PR) into
dev. -
Request review from at least 1 teammate.
-
After merge, CI/CD will deploy automatically to staging.
-
Approved PRs to
main= production deployment.
-
Use conventional commits:
feat: add trip request API fix: correct driver assignment bug docs: update API usage in README test: add unit tests for routing service
-
Keep commits small and focused.
-
Write descriptive commit messages.
-
Every PR must be reviewed by 1–2 members before merging.
-
Use GitHub’s Review → Comment → Approve workflow.
-
Be respectful & constructive.
-
Large PRs should be broken into smaller chunks.
-
Each service must provide a Dockerfile.
-
The hub repo must provide a docker-compose.yml for local startup.
-
Run:
docker-compose up
to spin up all services locally.
-
Java (Spring Boot) → Spring DevTools.
-
Node.js → Nodemon.
-
Python (FastAPI/Flask) → uvicorn with reload.
-
Go → Compile-watch scripts.
-
Unit Tests → Run per service (
pytest,JUnit,jest,go test). -
Integration Tests → Use docker-compose +
testcontainers. -
Contract Tests → Validate service API contracts against
contracts/.
CI/CD will fail PRs that do not pass tests. ✅
Each repo must include a .github/workflows/ci.yml with stages:
-
Lint → Check formatting & style.
-
Test → Run unit & integration tests.
-
Build → Build docker image.
-
Deploy → Push image to registry, deploy to staging.
Optional: require manual approval for production deploys.
-
Every service must include:
-
README.md(setup, usage, contributors). -
API documentation (Swagger/OpenAPI, gRPC
.proto).
-
-
API definitions should live in the contracts repo.
-
Services must keep documentation up to date with code.
We support two approaches:
-
Direct API calls (REST or gRPC).
-
Shared libraries (recommended) → Each hub can publish a small SDK/wrapper library (e.g.,
snapp-sdk,map-sdk) for easier integration.
Optional: Use message broker (Kafka/RabbitMQ) for event-driven communication (trip_requested, order_completed, payment_done).
-
Weekly sync meetings (short status check).
-
Each hub has its own Slack/Discord channel.
-
Architecture decisions recorded as ADR files in Markdown.
-
All diagrams & designs stored in a shared Notion/Confluence space.
-
Analytics Dashboards (Grafana/Metabase).
-
Monitoring & Alerts (Prometheus, ELK Stack).
-
Professional Logging (structured logs, log aggregation).
-
AI Features
-
Demand prediction for Snapp.
-
Route optimization in Map.
-
Product recommendations in Food.
-
These are not mandatory, but highly encouraged for teams aiming at extra credit or advanced experience.
-
Follow SOLID, DRY, KISS principles.
-
Use linters/formatters:
-
Java → Checkstyle.
-
Python → Black/Flake8.
-
Node.js → ESLint/Prettier.
-
Go → golangci-lint.
-
-
Each repo should have a
.editorconfigfor consistent style.
-
Each microservice has one main owner + reviewers.
-
Cross-hub tasks (CI/CD, contracts, monitoring) are joint responsibility.
-
Encourage pair programming and knowledge sharing between language groups.