This repository demonstrates excellent modern development practices for building "The IMDb of Sporting Events" - a comprehensive multi-sport discovery platform.
otw.sport/
├── frontend/ # SvelteKit web interface
├── app/ # Flutter mobile app
├── graphql-server/ # Multi-sport GraphQL API
├── DB/ # Hybrid database architecture (MongoDB + Neo4j)
├── shared/ # Shared types/utilities
├── dev-tools/ # Development utilities
└── .github/ # CI/CD workflows
- Domain Layer: Pure business entities (events, users, reviews)
- Business Layer: Multi-sport services, use cases, and business logic
- API Layer: Sport-agnostic GraphQL resolvers and integrations
- UI Layer: Cross-platform components with clear separation of concerns
- Database Layer: Hybrid MongoDB (documents) + Neo4j (relationships)
- Feature branches:
feature/description - Hotfix branches:
hotfix/fix-description - No direct pushes to main - everything via PR
- Conventional commits for automated versioning
- Pre-commit hooks (Husky): Lint + type check + tests
- Pre-push hooks: Full build + comprehensive tests + security audit
- PR validation: All checks must pass before merge
- pnpm/npm workspaces for monorepo dependency management
- Explicit engine requirements in package.json
- Dependency vulnerability scanning in CI
- Lock file consistency enforced
- TypeScript for type safety
- Vite for blazing fast builds
- TailwindCSS + DaisyUI for consistent styling
- Vitest for unit testing
- ESLint + Prettier for code consistency
- GraphQL with Mercurius (Fastify-based)
- TypeScript throughout
- Jest for testing
- Structured logging with correlation IDs
- Unit tests: Business logic, utilities, stores
- Component tests: Svelte component behavior
- Integration tests: API endpoints
- Type checking: Full TypeScript validation
- 91 tests passing with good coverage metrics
- Co-located tests (
.spec.tsnext to source) - Mock data factories for consistent test fixtures
- Proper isolation with beforeEach/afterEach cleanup
- Automated versioning based on conventional commits
- Changelog generation from commit messages
- GitHub releases with proper tagging
- No manual version management
- Build verification on every PR
- Security scanning with dependency audits
- Docker image building and registry pushes
- Multi-stage validation (lint → test → build → security)
- Dependency vulnerability scanning
- No secrets in code (environment variables)
- Security audit in CI pipeline
- Proper authentication patterns
- Centralized error handling with proper logging
- Graceful degradation in UI components
- Error boundaries in Svelte apps
- Structured error responses from API
- Structured JSON logging with correlation IDs
- Different log levels (debug, info, warn, error)
- Request/response logging in API
- Performance metrics tracking
- API health endpoints for monitoring
- Dependency health checks (database, external APIs)
- Readiness/liveness probes for containerized deployments
- Environment variables for all external dependencies
- Type-safe configuration with validation
- Development/production environment separation
- Sensible defaults with override capabilities
- TypeScript interfaces as living documentation
- JSDoc comments for complex business logic
- README files with setup instructions
- Contribution guidelines for team onboarding
- Branching strategy clearly defined
- Release process automated and documented
- Development setup step-by-step guides
- Multi-stage builds for optimized images
- Security scanning of container images
- Health check endpoints for orchestration
- Proper user permissions (non-root)
- Tree shaking and code splitting
- Asset optimization with proper caching
- Bundle analysis and size monitoring
- Fast development builds with HMR
- Caching strategies for API responses
- Lazy loading of components
- Efficient state management with Svelte stores
- Database query optimization
- Strict TypeScript configuration with no
anytypes - Interface-first design for clear contracts
- Proper type exports and module boundaries
- Generic types for reusable components
- Single responsibility principle for components
- Props-down, events-up data flow
- Reusable UI components with consistent APIs
- Clear separation between business and presentation logic
- Centralized state for application data
- Reactive updates with automatic UI synchronization
- Type-safe stores with TypeScript
- Proper subscription management to prevent memory leaks
- Unidirectional data flow from API → Store → Component
- Business logic isolated in service layer
- API abstraction with GraphQL client
- Error state management throughout the application
- Feature-based folder structure for scalability
- Index files for clean imports
- Consistent naming conventions across the codebase
- Proper file and directory naming (kebab-case, PascalCase where appropriate)
- Conventional commits for semantic versioning
- Descriptive PR titles and descriptions
- Small, focused commits for easier review
- No merge commits on main branch (squash and merge)
- Consistent color palette with CSS custom properties
- Responsive design with mobile-first approach
- Accessibility considerations (semantic HTML, ARIA labels)
- Loading states and error handling in the UI
- Progressive enhancement for better performance
- Graceful degradation when features fail
- Clear user feedback for all actions
- Intuitive navigation and information architecture
- Proven Patterns: All practices are battle-tested and working in production
- Modern Stack: Uses current best-in-class tools and approaches
- Scalable Architecture: Clean separation allows easy feature additions
- Developer Experience: Excellent tooling, fast feedback loops, clear processes
- Production Ready: Full CI/CD, monitoring, security, and deployment automation
- Team Friendly: Clear contribution guidelines, automated quality gates
- Maintainable: TypeScript everywhere, good test coverage, clear documentation
- Performance Focused: Optimized builds, efficient runtime, proper caching
- Security Conscious: Vulnerability scanning, secure defaults, proper authentication
- Observable: Comprehensive logging, monitoring, and health checks
To use this repository as a template for your greenfield project:
- Fork or clone this repository
- Update package.json files with your project details
- Configure environment variables for your specific needs
- Update GraphQL schema and resolvers for your domain
- Modify UI components to match your design requirements
- Set up your CI/CD secrets and deployment targets
- Update documentation to reflect your project specifics
This repository demonstrates how to build a modern, maintainable, and scalable web application with excellent developer experience and production readiness! 🚀