Development Setup
Development Setup
This guide will help you set up your local development environment for contributing to SaaniCare.
Prerequisites
Before you begin, ensure you have:
- Node.js >= 22.0.0 (we recommend using nvm)
- pnpm >= 8.0.0
- PostgreSQL >= 14 (or use Docker)
- Git for version control
- Code Editor: VS Code recommended
Initial Setup
1. Clone the Repository
git clone <repository-url>
cd kids_learning
2. Install Dependencies
pnpm install
3. Set Up Environment Variables
cp env.example .env.local
Edit .env.local with your local configuration.
4. Start Docker Services (Recommended)
make docker-up
This starts PostgreSQL, Redis, and Mailhog.
5. Set Up Database
cd apps/api
pnpm prisma migrate dev
pnpm prisma db seed
Development Workflow
Start Development Servers
# Start all apps
pnpm dev
# Or start specific app
cd apps/parent-web && pnpm dev
Run Tests
# Run all tests
pnpm test
# Run tests for specific package
pnpm --filter @saanicare/api test
Linting and Formatting
# Lint all code
pnpm lint
# Fix linting issues
pnpm lint:fix
# Format all code
pnpm format
Project Structure
See Project Structure for details on the monorepo organization.
Code Style
- TypeScript: Strict mode enabled
- ESLint: Configured for Next.js and React
- Prettier: Automatic code formatting
- Conventional Commits: Follow commit message conventions
Making Changes
- Create a feature branch from
main - Make your changes
- Write/update tests
- Ensure all tests pass
- Format and lint your code
- Submit a pull request
Getting Help
- Check existing documentation
- Review similar code in the codebase
- Ask questions in pull requests
- Contact the team