AI-Powered Travel Packing Assistant
This is a monorepo using Yarn Workspaces with the following packages:
@aipackr/types- Shared TypeScript type definitions@aipackr/api- NestJS backend API@aipackr/web- Next.js frontend with domain-driven structure@aipackr/core-engine- Packing algorithms and business logic
The Next.js frontend follows a domain-driven architecture:
packages/web/src/
├── app/ # Next.js App Router
├── domains/ # Business domains
│ ├── auth/ # Authentication domain
│ ├── trips/ # Trip management domain
│ ├── clothing/ # Clothing management domain
│ ├── weather/ # Weather data domain
│ └── packing/ # Packing recommendations domain
├── shared/ # Shared components and utilities
│ ├── components/ui/ # Reusable UI components
│ ├── hooks/ # Shared React hooks
│ ├── utils/ # Utility functions
│ └── services/ # Shared services
└── lib/ # External integrations
- Node.js 22+
- Yarn 4.3.1+
- Docker & Docker Compose
- Clone the repository
- Install dependencies:
yarn install - Copy environment files:
cp packages/api/.env.example packages/api/.env cp packages/web/.env.example packages/web/.env.local
# Start all services in containers
docker compose up --buildServices available:
- Frontend: http://localhost:3000
- API: http://localhost:3001
- PostgreSQL: localhost:5432
- Redis: localhost:6379
# Terminal 1: Start only databases
docker compose up postgres redis
# Terminal 2: Start API locally (faster hot reloading)
yarn workspace @aipackr/api dev
# Terminal 3: Start web locally (faster hot reloading)
yarn workspace @aipackr/web devBenefits of hybrid approach:
- ⚡ Faster hot reloading and iteration
- 🐛 Better debugging and IDE integration
- 📝 Immediate console output and logging
- 🔧 Easier to modify and test changes
# Install and start PostgreSQL and Redis locally
# Then run services directly
yarn workspace @aipackr/api dev
yarn workspace @aipackr/web dev-
Start databases first:
yarn dev:db
-
In a new terminal, start the API:
yarn dev:api
-
In another terminal, start the web app:
yarn dev:web
# Install concurrently if not already installed
yarn add -D concurrently
# Start everything with one command
yarn dev:hybridPort conflicts:
- API default: 3001
- Web default: 3000
- PostgreSQL: 5432
- Redis: 6379
Database connection issues:
- Ensure PostgreSQL and Redis are running:
yarn dev:db - Check environment variables in
packages/api/.env - Verify database URL:
postgresql://aipackr:password@localhost:5432/aipackr
Hot reloading not working:
- Use local development instead of Docker for faster iteration
- Check file watchers:
yarn workspace @aipackr/api devandyarn workspace @aipackr/web dev
Dependency issues:
- Clean and reinstall:
yarn clean && yarn install - Rebuild packages:
yarn build
yarn build- Build all packagesyarn dev- Start development serversyarn test- Run tests across all packagesyarn lint- Lint all packagesyarn typecheck- Type check all packagesyarn clean- Clean build outputs
yarn dev:db- Start only PostgreSQL and Redis databasesyarn dev:api- Start API service locally (requires databases running)yarn dev:web- Start web service locally (requires API running)yarn dev:hybrid- Start hybrid development (databases + local services)yarn prod- Start full production environment with Docker
yarn workspace @aipackr/api dev- Start API with hot reloadingyarn workspace @aipackr/web dev- Start web with hot reloadingyarn workspace @aipackr/types build- Build shared typesyarn workspace @aipackr/core-engine build- Build core algorithms
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Backend: NestJS, TypeScript, PostgreSQL, Redis, Prisma
- AI: AWS Rekognition, Claude API
- Infrastructure: Docker, AWS (ECS, RDS, S3)
- ✅ Yarn Workspaces monorepo structure
- ✅ TypeScript configurations for all packages
- ✅ NestJS backend API foundation
- ✅ Next.js frontend with domain-driven structure
- ✅ Core packing algorithms package
- ✅ Docker configuration
- ✅ Shared type definitions
- Set up PostgreSQL database with Prisma migrations
- Implement authentication system
- Create basic API endpoints for trips and users
- Integrate weather APIs
- Set up AWS S3 for image uploads
MIT License - see LICENSE file for details.