https://github.com/erishen/interview
Next.js Turborepo Monorepo
https://github.com/erishen/interview
monorepo nextjs react supabase tailwindcss turborepo typescript vercel
Last synced: about 1 month ago
JSON representation
Next.js Turborepo Monorepo
- Host: GitHub
- URL: https://github.com/erishen/interview
- Owner: erishen
- Created: 2025-12-14T07:02:25.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-28T11:33:06.000Z (6 months ago)
- Last Synced: 2025-12-29T08:17:07.378Z (6 months ago)
- Topics: monorepo, nextjs, react, supabase, tailwindcss, turborepo, typescript, vercel
- Language: TypeScript
- Homepage: https://web.erishen.cn
- Size: 560 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Interview Project
A modern interview project built with Next.js and monorepo architecture using Turborepo.
# Vercel URL
- https://admin.erishen.cn
- https://web.erishen.cn
## ๐๏ธ Architecture
This project uses a monorepo structure with the following organization:
```
interview/
โโโ apps/
โ โโโ web/ # Main Next.js application
โ โโโ admin/ # Admin dashboard (Next.js)
โโโ packages/
โ โโโ ui/ # Shared UI components
โ โโโ utils/ # Utility functions
โ โโโ config/ # Configuration files
โ โโโ types/ # TypeScript type definitions
โ โโโ eslint-config/ # Shared ESLint configuration
โโโ package.json # Root package.json
โโโ pnpm-workspace.yaml
โโโ turbo.json # Turborepo configuration
โโโ tsconfig.json # Root TypeScript configuration
```
## ๐ Getting Started
### Prerequisites
- Node.js 18+
- pnpm 8+
### Installation
1. Clone the repository:
```bash
git clone
cd interview
```
2. Install dependencies:
```bash
pnpm install
```
3. Start the development server:
```bash
pnpm dev
```
This will start:
- Web app at http://localhost:3000
- Admin app at http://localhost:3003
## ๐ฆ Available Scripts
- `pnpm dev` - Start all applications in development mode
- `pnpm build` - Build all applications for production
- `pnpm lint` - Run ESLint across all packages
- `pnpm type-check` - Run TypeScript type checking
- `pnpm test` - Run tests across all packages
- `pnpm clean` - Clean build artifacts
- `pnpm format` - Format code with Prettier
## ๐๏ธ Project Structure
### Apps
- **web**: Main Next.js application with modern UI
- **admin**: Admin dashboard for managing the application
### Packages
- **ui**: Reusable React components with Tailwind CSS
- **utils**: Utility functions and helpers
- **config**: Configuration files and constants
- **types**: Shared TypeScript type definitions
- **eslint-config**: Shared ESLint configuration
## ๐ ๏ธ Tech Stack
- **Framework**: Next.js 14 with App Router
- **Language**: TypeScript
- **Styling**: Tailwind CSS
- **Build Tool**: Turborepo
- **Package Manager**: pnpm
- **Linting**: ESLint + Prettier
## ๐ Articles
Technical articles about this project:
- ๐จ๐ณ **[ไธชไบบๅๅฎข](https://erishen.cn/?p=180)** - ไป้ถๆญๅปบๅ
จๆ ๆๆฏ็ฅ่ฏๅบ๏ผMonorepo + Next.js 14 + FastAPI
- ๐จ๐ณ **[ๆ้](https://juejin.cn/post/7589110783146164258)** - ไป้ถๆญๅปบๅ
จๆ ๆๆฏ็ฅ่ฏๅบ๏ผMonorepo + Next.js 14 + FastAPI
- ๐จ๐ณ **[SegmentFault](https://segmentfault.com/a/1190000047510388)** - ไป้ถๆญๅปบๅ
จๆ ๆๆฏ็ฅ่ฏๅบ๏ผMonorepo + Next.js 14 + FastAPI
- ๐ **[Medium](https://medium.com/@leisun8309/building-a-full-stack-technical-knowledge-base-from-scratch-monorepo-next-js-14-fastapi-8d5cc533d401)** - Building a Full-Stack Technical Knowledge Base from Scratch: Monorepo + Next.js 14 + FastAPI
## ๐ง Development
### Adding New Packages
To add a new package to the monorepo:
1. Create a new directory in `packages/`
2. Add a `package.json` with the naming convention `@interview/package-name`
3. Update the root `tsconfig.json` paths if needed
4. Add the package to relevant app dependencies
### Working with Shared Components
Components from the `@interview/ui` package can be imported in any app:
```tsx
import { Button, Card, Input } from "@interview/ui";
```
### Environment Variables
Create `.env.local` files in individual apps for environment-specific variables:
```bash
# apps/web/.env.local
NEXT_PUBLIC_API_URL=http://localhost:3000/api
```
## ๐ Code Style
This project uses:
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
Run `pnpm lint` and `pnpm format` before committing changes.
## ๐ Deployment
### Building for Production
```bash
pnpm build
```
### Individual App Deployment
Each app can be deployed independently:
```bash
# Build specific app
cd apps/web
pnpm build
pnpm start
```
## ๐ค Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests and linting
5. Submit a pull request
## ๐ License
This project is licensed under the MIT License.