Modern SaaS platform built with Next.js 16, React 19, and Go.
- Node.js 25.1.0+ & pnpm 10.20.0+
- Go 1.25.3+
- Air (Go hot reload tool)
- Docker & Docker Compose
- pre-commit framework
# Clone the repository
git clone https://github.com/egeuysall/ryva.git
cd ryva
# Run the automated setup script
make setup-dev
make setup-dev-autoThe setup script will:
- Verify all prerequisites (Node.js, Go, pnpm, Docker, etc.)
- Check project structure integrity
- Create .env files from examples (auto-creates in
--automode) - Install dependencies (frontend + backend)
- Set up git hooks (pre-commit, pre-push, commit-msg)
- Optionally run build verification tests (skipped in
--automode) - Provide a summary and quick reference guide
Options:
--autoor-a: Run in automatic mode without prompts (useful for CI/CD)--helpor-h: Show help message
# Install Air for Go hot reloads
go install github.com/cosmtrek/air@latest
# Install pre-commit
pip install pre-commit # or: brew install pre-commit
# Clone and setup
git clone https://github.com/egeuysall/ryva.git
cd ryva
# Install dependencies
make install
# Set up git hooks (includes commit message validation)
make pre-commit-install
# Set up environment variables
cp .env.example .env
cp apps/web/.env.example apps/web/.env
cp apps/api/.env.example apps/api/.env
# Edit .env files with your credentials
# Start development (migrations run automatically)
make devVisit:
- Frontend: http://localhost:3000
- API: http://localhost:8080
- Docker (Local): http://localhost (via Caddy)
- Frontend: Next.js 16 (App Router), React 19, Tailwind CSS v4, TypeScript
- Backend: Go 1.25 with Chi/Gorilla router, PostgreSQL
- Database: PostgreSQL (Supabase or self-hosted)
- Infrastructure: Docker, Caddy reverse proxy, GitHub Actions CI/CD
- Proxy: Caddy with rate limiting and SSL
- Monitoring: Sentry, health checks, logging
- Hot Reload: Air (Go) + Next.js Fast Refresh
make help # Show all available commands
make dev # Start both servers with hot reload
make dev-web # Start only frontend
make dev-api # Start only backend (with Air)
make build # Build all applications
make test # Run all tests
make lint # Lint all code
make format # Format all code
make clean # Clean build artifactscd apps/web
pnpm run dev # Start Next.js dev server
pnpm run build # Build for production
pnpm run lint # Lint TypeScript/React
pnpm run format # Format with Prettier
pnpm run type-check # TypeScript type checkingcd apps/api
make dev # Start with Air (hot reload)
make build # Build binary
make test # Run tests
make lint # Run golangci-lint
make format # Format with gofmt# Local development with Docker
docker compose -f docker-compose.local.yml up -d
curl http://localhost/health # Test API via Caddy
curl http://test.localhost # Test Caddy directly
# Production deployment
docker compose up -d # Uses GHCR images
docker compose ps # Check status
docker compose logs -f # View logs
# Infrastructure commands
make docker-build # Build all images
make docker-up # Start containers
make docker-down # Stop containers
make docker-logs # View logsryva/
βββ apps/
β βββ web/ # Next.js frontend
β β βββ src/
β β β βββ app/ # App Router pages
β β β βββ components/
β β β βββ modules/ # Feature modules
β β β βββ lib/ # Utilities
β β βββ package.json # Frontend dependencies & scripts
β βββ api/ # Go backend
β βββ cmd/server/ # Application entry
β βββ internal/
β β βββ modules/ # Feature modules
β β βββ config/ # Configuration
β β βββ router/ # HTTP routing
β β βββ shared/ # Shared utilities
β βββ db/
β β βββ migrations/ # SQL migrations
β β βββ queries/ # Database queries
β βββ Makefile # Go-specific commands
βββ infra/
β βββ caddy/ # Reverse proxy with rate limiting
β β βββ Dockerfile # Custom Caddy build
β β βββ Caddyfile # Production config
β β βββ Caddyfile.local # Development config
β βββ sentry/ # Error tracking setup
βββ docs/ # Documentation
β βββ infrastructure/ # Infrastructure docs
β βββ development/ # Development guides
β βββ frontend/ # Frontend docs
βββ scripts/ # Utility scripts
βββ Makefile # Root orchestration (primary interface)
βββ docker-compose.yml # Production container orchestration
βββ docker-compose.local.yml # Local development
- Makefile-based build system - Cross-language orchestration
- Hot reload - Both frontend (Next.js) and backend (Air)
- Automatic migrations - Run on API startup
- Pre-commit hooks - Code quality + Conventional Commits enforcement
- Type-safe - Strict TypeScript, explicit Go types
- Modular architecture - Clean separation of concerns
- Docker ready - Multi-stage builds with health checks
- Production Infrastructure - Caddy proxy with edge-level rate limiting, SSL
- CI/CD - Automated deployments with canary + rolling updates
- State Management - TanStack Query + Zustand
- Comprehensive Testing - Vitest, Playwright, Go testing with 80% coverage
- Server Components by default
- Client Components (
'use client') only for: events, state, browser APIs, hooks - Strict TypeScript, no
anytypes - Mobile-first responsive design with dark mode
- Type all component props with interfaces
- Clean architecture: handler β service β repository
- Never ignore errors, always return and wrap them
- Use
context.Contextfor all database operations - Keep handlers thin, business logic in services
- Validate all inputs before processing
- TanStack Query - Server state, caching, data synchronization
- Zustand - Client state, UI state, user preferences
- Type-safe stores and hooks
- DevTools integration for debugging
Comprehensive testing infrastructure with 80% coverage enforcement in CI.
# Run all tests (frontend + backend)
make test
# Frontend tests
cd apps/web
pnpm test # Unit & integration tests
pnpm test:watch # Watch mode
pnpm test:ui # UI mode
pnpm test:coverage # With coverage
pnpm test:e2e # E2E tests (Playwright)
# Backend tests
cd apps/api
make test # All tests
make test-unit # Unit tests only
make test-integration # Integration tests only
make test-e2e # E2E tests only
make test-coverage # With coverage report- Frontend: Vitest + React Testing Library + Playwright
- Backend: Go testing + testify + httptest
- CI/CD: GitHub Actions with parallel execution and coverage enforcement (80%)
- Coverage: Automated threshold checking and reporting
Production-grade continuous integration and deployment with GitHub Actions.
Every PR and push triggers:
API (Go):
- Linting (golangci-lint v2.3.0)
- Unit & integration tests
- 80% coverage enforcement
- Security scanning (Gosec + govulncheck)
- Binary build verification
Web (Next.js):
- ESLint & Prettier checks
- TypeScript type checking
- Unit tests with 80% coverage
- E2E tests (Playwright)
- Production build verification
- Security audits (pnpm audit)
Commit Validation:
- Conventional Commits enforcement
- PR title validation
master: Production-ready code only (requires PR + 1 approval + all checks)develop: Integration branch (requires PR + 1 approval + all checks)- All commits must follow Conventional Commits
We use Git Flow with Conventional Commits.
Format: <type>/<ticket-number>-<short-description>
Types: feature/, fix/, hotfix/, release/, refactor/, docs/, test/, chore/
Examples:
feature/RYVA-123-user-authentication
fix/RYVA-456-login-validation
hotfix/RYVA-789-security-patchFormat: <type>(<scope>): <subject>
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Examples:
feat(auth): add JWT token validation
fix(api): resolve race condition in user service
docs(readme): update installation stepsNote: Commit messages are automatically validated by pre-commit hooks. Invalid messages (e.g., "Debug project") will be rejected. The commit-msg hook ensures all commits follow Conventional Commits format.
# 1. Update develop
git checkout develop
git pull origin develop
# 2. Create feature branch
git checkout -b feature/RYVA-123-my-feature
# 3. Make changes and test
# ... code changes ...
make test && make lint
# 4. Commit with conventional format
git add .
git commit -m "feat(api): add user endpoint"
# 5. Push and create PR
git push origin feature/RYVA-123-my-feature
# Create PR on GitHub targeting developBefore merge:
- At least 1 approval from code owner
- All CI/CD checks pass (lint, test, build, security)
- 80% test coverage maintained
- No merge conflicts
- All conversations resolved
- Commit messages follow convention
We follow Semantic Versioning: MAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes (backwards compatible)
# 1. Create release branch from develop
git checkout develop
git pull origin develop
git checkout -b release/v1.2.0
# 2. Update version numbers
# - Update package.json versions
# - Update API version constants
# - Update CHANGELOG.md
# 3. Final testing
cd apps/api && make test-all
cd apps/web && pnpm test && pnpm test:e2e
# 4. Commit version bump
git add .
git commit -m "chore(release): bump version to 1.2.0"
# 5. Push and create PR to master
git push origin release/v1.2.0
# Create PR with title: "Release v1.2.0"
# Requires 2 approvals for release branches
# 6. After merge, tag the release
git checkout master
git pull origin master
git tag -a v1.2.0 -m "Release version 1.2.0"
git push origin v1.2.0
# 7. Merge back to develop
git checkout develop
git merge master
git push origin develop
# 8. Cleanup
git branch -d release/v1.2.0
git push origin --delete release/v1.2.0- All features merged to develop
- All tests passing with 80%+ coverage
- Documentation updated
- CHANGELOG.md updated
- Version numbers bumped
- Release notes prepared
- Database migrations tested
- Environment variables documented
- Deployment plan ready
- Rollback plan documented
For urgent production fixes:
# 1. Create hotfix branch from master
git checkout master
git pull origin master
git checkout -b hotfix/RYVA-999-critical-fix
# 2. Make the fix and test thoroughly
# ... fix the issue ...
make test-all
# 3. Commit and push
git add .
git commit -m "fix(api): patch critical security vulnerability"
git push origin hotfix/RYVA-999-critical-fix
# 4. Create PR to master (fast-track review)
# 5. After merge, tag with patch version
git checkout master
git pull
git tag -a v1.2.1 -m "Hotfix version 1.2.1"
git push origin v1.2.1
# 6. Merge back to develop
git checkout develop
git merge master
git push origin developHotfix Criteria:
- π₯ Security vulnerabilities
- π Critical bugs affecting all users
- π₯ Production outages
- π Data integrity issues
Migrations run automatically when the API starts.
make db-create-migration name=add_users_tableThis creates timestamped .up.sql and .down.sql files in apps/api/db/migrations/.
# Local development
docker compose -f docker-compose.local.yml up -d
docker compose -f docker-compose.local.yml logs -f
# Production
docker compose up -d
docker compose ps
# Make commands
make docker-build # Build images
make docker-up # Start containers
make docker-down # Stop containers
make docker-logs # View logs- Contributing Guide - Detailed contribution guidelines
- Development Workflow - Complete workflow documentation
- GitHub Rulesets - Repository governance setup
- Setup Guide - GitHub configuration walkthrough
- Infrastructure Guide - Docker, Caddy, deployment
- Docker Reference - Container orchestration
- State Management - TanStack Query + Zustand
- Testing Guide - Comprehensive testing documentation
We welcome contributions! Please read our Contributing Guide for:
- Branch naming conventions
- Commit message standards
- Pull request process
- Code style guidelines
- Development workflow
Quick tips:
- Always branch from
develop - Use conventional commit messages
- Ensure 80% test coverage
- Run tests and linters before pushing
- Create descriptive PRs with the template
See LICENSE
Built with β€οΈ using Next.js, React, and Go