Found a bug? Open an issue. Noticed documentation is out out of date? Update it. See a rough edge in the dev experience? Smooth it out.
Take ownership. Make it better. Ship it.
We use Conventional Commits for PRs.
Examples:
feat: add user profile page
fix: resolve login redirect issue
docs: update README setup instructions
chore: upgrade dependenciesImportant
Keep PRs small and focused. Split large features into smaller PRs that are easy to review. This helps:
- Maintain clear thought process
- Ship features incrementally
- Allow reviewers to focus on details
| Tool | Description | Installation |
|---|---|---|
| Docker | Containerization | docker.com |
| Doppler | Secrets management | doppler.com/docs/install-cli |
| Figma | Design tool | figma.com |
| Just | CLI tool build with Rust | Just |
Tip
macOS users: Use OrbStack instead of Docker Desktop — it's lighter and faster.
| Tool | Description | Installation |
|---|---|---|
| Go | Backend language | go.dev/dl |
| PostgreSQL 15 | Database | postgresql.org |
| psql | CLI to interact with a PostgreSQL database | install psql |
| Goose | Database migrations | go install github.com/pressly/goose/v3/cmd/goose@latest |
| golangci-lint | Go linter | golangci-lint.run |
| goimports | Formats code + manages imports | go install golang.org/x/tools/cmd/goimports@latest |
| Swag CLI | Generate API doc | go install github.com/swaggo/swag/cmd/swag@latest |
| LocalStack | Run AWS services locally | install cli |
| Temporal | Run workflow orchestration | install cli |
Useful Go resources:
| Tool | Description | Installation |
|---|---|---|
| Bun | JavaScript runtime & package manager | bun.sh |
| Xcode | iOS simulator (macOS only) | App Store |
| Expo Go | Run app on physical device | iOS / Android |
| TestFlight | iOS beta testing (later) | App Store |
Note
If you're not on macOS, you can test the app on your physical phone using the Expo Go app.
Doppler manages our environment variables. The token will expire once in a while for security reason, so you will need to do this process again.
# 1. Install Doppler CLI
brew install dopplerhq/cli/doppler # macOS
# See https://docs.doppler.com/docs/install-cli for other OS
# 2. Login to Doppler
doppler login
# 3. Select the workspace (follow the prompts)
doppler setupWhen prompted, select:
- Project:
backend - Config:
dev(for local development)
We use a justfile to run both frontend and backend commands from any directory at high speed. You can view all available commands with:
justEnsure your database is up in the Docker Container by:
just dev-be # will start both server and database OR
just up-db # just start the database in containerThen you can go into PSQL and execute any SQL query
# Local database
just connect-db
# Production database
just connect-prod-db# will turn off local database
just down-dbNote
Can't connect to the database? Usually a port conflict or conflicting Postgres installations.
1. Check what's using port 5432:
lsof -i :54322. Check for running Postgres instances:
ps aux | grep postgres3. Common fixes:
- Stop Homebrew Postgres:
brew services stop postgresqlorbrew services stop postgresql@15 - Stop system Postgres (Linux):
sudo systemctl stop postgresql - Kill a specific process:
kill <PID>(use the PID from above) - Remove old socket files:
rm /tmp/.s.PGSQL.5432(if you see "socket file" errors)
| Action | Local | Production |
|---|---|---|
| Create migration | just migrate-create name=<informative-name> |
— |
| Migrate up | just migrate-up |
just migrate-up-prod |
| Migrate down | just migrate-down |
just migrate-down-prod |
Caution
Always run migrations locally and ensure it works correctly first, then open a PR, get it reviewed and merged, then apply to production.
Ensure you have your Docker app running first.
cd backend
go mod download
just dev-beTo verify the server is running, visit Healthcheck at http://localhost:8000/healthcheck or API doc at http://localhost:8000/docs
cd frontend
bun install
just dev-fe
# you can do also `just ios-fe` to start iOS simulator on MacOSTo generate API calls on frontend side and keep our API documentation up-to-date, we will need to add comments above the controllers
// @Summary Healthcheck endpoint
// @Description Returns OK if the server is running
// @Tags example
// @Produce json
// @Success 200 {string} string "ok"
// @Router /healthcheck [get]
func HealthcheckHandler(c *fiber.Ctx) error {
return c.JSON(fiber.Map{
"status": "ok",
})
}Then, we can generate the swagger.yaml file with:
just api-docYou can now start the server and your documentation changes should reflect on the route http://localhost:8000/docs
# create a local AWS environment
just localstack-up
# remove local AWS environment
just localstack-downWe use mockery v3 to auto-generate test mocks from Go interfaces.
# macOS (Homebrew)
brew install mockery
# Go install (any OS)
go install github.com/vektra/mockery/v3@v3.6.4For other installation methods see the official docs.
Mock generation is configured in backend/.mockery.yml. Each interface you want mocked must be listed there under its package path. For example:
packages:
toggo/internal/services:
interfaces:
FileServiceInterface:
SearchServiceInterface:
toggo/internal/repository:
interfaces:
ImageRepository:
SearchRepository:cd backend
mockeryMocks are written to backend/internal/tests/mocks/ and committed to the repository.
Important
Never edit generated mock files by hand. Add the interface to .mockery.yml and re-run mockery instead.
just test-be