Getting Started
Installation
Step-by-step guide to set up the Hireable development environment
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 20.x or higher (Download)
- npm 10.x or higher (comes with Node.js)
- MongoDB (local installation or MongoDB Atlas)
- Git for version control
Quick Start
1. Clone the Repository
2. Install Dependencies
This installs dependencies for all workspaces (apps and packages) using npm workspaces.
3. Set Up Environment Variables
Edit .env.local with your configuration:
4. Set Up Git Hooks (Optional)
Initialize Husky for pre-commit hooks:
5. Start Development Server
This starts all applications via TurboRepo:
- Frontend: http://localhost:3000
- API: http://localhost:3001
To run a specific app only:
Available Scripts
Development
| Command | Description |
|---|---|
npm run dev | Start all apps in development mode |
npm run build | Build all apps and packages |
npm run start | Start production servers |
Code Quality
| Command | Description |
|---|---|
npm run lint | Run ESLint across all workspaces |
npm run format | Format code with Prettier |
npm run validate | Run type-check, lint, and format check |
Testing
| Command | Description |
|---|---|
npm run test | Run tests once |
npm run test:watch | Run tests in watch mode |
npm run test:ui | Run tests with Vitest UI |
npm run test:coverage | Generate coverage report |
npm run test:e2e | Run Playwright E2E tests |
Maintenance
| Command | Description |
|---|---|
npm run check-unused | Check for unused code with Knip |
Troubleshooting
MongoDB Connection Issues
If you see "Database connection failed":
- Ensure MongoDB is running locally, or
- Update
MONGODB_URIto point to your MongoDB Atlas cluster
Port Already in Use
If port 3000 or 3001 is already in use:
Node Version Issues
Ensure you're using Node.js 20.x:
Consider using nvm to manage Node versions.
Next Steps
- Configuration - Detailed environment setup
- Project Structure - Understanding the codebase