A modern monorepo template combining Next.js and FastAPI applications with Turborepo-like structure.
This monorepo includes the following packages/apps:
dashboard
: a Next.js app for the main dashboardweb
: a Gatsby app for the landing pageapi-hono
: a Hono API serverfastapi-app
: a FastAPI backend for AI functionality
@repo/ui
: a React component library shared by bothweb
anddocs
applications@repo/eslint-config
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)@repo/typescript-config
:tsconfig.json
s used throughout the monorepo
packages-py
: Python packages shared across FastAPI applications
- Node.js >= 18
- Python >= 3.9
- uv (Python package manager)
- Clone the repository:
git clone https://github.com/your-org/100xtemplates-core.git
cd 100xtemplates-core
- Install Node.js dependencies:
npm install
- Initialize Python environment:
npm run py:init
- Start development servers:
# Start all services
npm run dev
# Or start specific services
npm run dev -- --filter=web
npm run dev -- --filter=docs
npm run py:dev
npm run build
- Build all apps and packagesnpm run dev
- Develop all apps and packagesnpm run lint
- Lint all codenpm run format
- Format all code
npm run py:init
- Initialize Python virtual environment and install dependenciesnpm run py:dev
- Start FastAPI development server with hot reloadnpm run py:build
- Install/update Python dependenciesnpm run py:test
- Run Python testsnpm run py:lint
- Run all Python linting toolsnpm run py:format
- Format Python codenpm run py:check
- Run Ruff checksnpm run py:clean
- Remove Python virtual environment
.
├── apps/
│ ├── api-hono/ # Hono API server
│ ├── dashboard/ # Next.js dashboard app
│ ├── fastapi-app/ # FastAPI backend app
│ └── web/ # Gatsby web app
├── packages/
│ ├── auth/ # Authentication utilities
│ ├── db/ # Database utilities
│ ├── ui/ # Shared React components
│ ├── eslint-config/ # ESLint configurations
│ └── typescript-config/ # TypeScript configurations
├── packages-py/ # Shared Python packages
├── deployments/ # Deployment configurations
├── docker/ # Docker configurations
├── pyproject.toml # Python project configuration
└── package.json # Node.js project configuration
-
Configure Environment Variables
- Create
.env
files for each app - Set up database connections and API keys
- Create
-
Set Up Database
- Configure SQLAlchemy models in
fastapi-app
- Set up Alembic migrations
- Configure SQLAlchemy models in
-
Add Authentication
- Implement JWT or OAuth2 authentication
- Set up protected routes
-
Add API Documentation
- Configure FastAPI OpenAPI documentation
- Add API examples and descriptions
-
Set Up CI/CD
- Configure GitHub Actions or similar
- Set up automated testing and deployment
-
Add Monitoring
- Set up logging
- Configure error tracking
- Add performance monitoring
Turborepo can use Remote Caching to share cache artifacts across machines.
To enable Remote Caching:
npx turbo login
npx turbo link