A web-starter with e2e type-safety, an Expo application, and a Golang API with hexagonal architecture.
-
Clone the Repository
git clone https://github.com/arthur-fontaine/web-starter.git cd web-starter rm -rf .git
-
Replace Project Name Globally replace the string
webstarter
with your project name. -
Generate Initial Setup
moon :generate
- Moonrepo: For running tasks in the monorepo.
- Expo App: A cross-platform application (web, iOS, and Android).
- Go API: A Golang-based API.
- PostgreSQL Database: A PostgreSQL database setup.
- Source Directory:
src
- File-based Routing:
src/app
(Using Expo Router) - Feature-based Organization:
src/features
- Components:
src/features/xxx/components
- Hooks:
src/features/xxx/hooks
- Main Page:
src/features/xxx/xxx-page.tsx
- Components:
- Shared Code:
src/shared
(e.g., hooks, components, etc.)
- File-based Routing:
- Main API Code:
cmd/server/main.go
(Initializes the API and handles dependency injection) - Database Schema:
db/schema.prisma
- Bob Generator Configuration:
db/bobgen.yaml
- Domain Entities:
internal/domain/xxx/entity.go
- Repositories:
internal/domain/xxx/repository.go
- Repository Implementations:
internal/repository
- Service Implementations:
internal/usecase
- Service Definitions:
proto/xxx/xxx.proto
- Docker Configuration:
docker-compose.yaml
- Build Configuration:
Dockerfile
- Task Definitions:
moon.yml
- Docker Configuration:
docker-compose.yaml
- Use TanStack Query.
- Place every query inside a hook.
- Implement Hexagonal Architecture.