A modern interview project built with Next.js and monorepo architecture using Turborepo.
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
- Node.js 18+
- pnpm 8+
- Clone the repository:
git clone <repository-url>
cd interview- Install dependencies:
pnpm install- Start the development server:
pnpm devThis will start:
- Web app at http://localhost:3000
- Admin app at http://localhost:3003
pnpm dev- Start all applications in development modepnpm build- Build all applications for productionpnpm lint- Run ESLint across all packagespnpm type-check- Run TypeScript type checkingpnpm test- Run tests across all packagespnpm clean- Clean build artifactspnpm format- Format code with Prettier
- web: Main Next.js application with modern UI
- admin: Admin dashboard for managing the application
- 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
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Build Tool: Turborepo
- Package Manager: pnpm
- Linting: ESLint + Prettier
To add a new package to the monorepo:
- Create a new directory in
packages/ - Add a
package.jsonwith the naming convention@interview/package-name - Update the root
tsconfig.jsonpaths if needed - Add the package to relevant app dependencies
Components from the @interview/ui package can be imported in any app:
import { Button, Card, Input } from "@interview/ui";Create .env.local files in individual apps for environment-specific variables:
# apps/web/.env.local
NEXT_PUBLIC_API_URL=http://localhost:3000/apiThis project uses:
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
Run pnpm lint and pnpm format before committing changes.
pnpm buildEach app can be deployed independently:
# Build specific app
cd apps/web
pnpm build
pnpm start- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is licensed under the MIT License.