A smart wardrobe management and outfit planning application that helps users organize their clothing items and generate outfit suggestions.
- Runtime: Node.js 20
- Framework: Fastify (high-performance web framework)
- Database: PostgreSQL 15
- ORM: Prisma
- Language: TypeScript
- Authentication: JWT (JSON Web Tokens)
- Testing: Vitest
- Linting: ESLint
- Framework: React Native
- Platform: Expo (~50.0.6)
- Language: TypeScript
- Navigation: React Navigation
- State Management: Zustand
- HTTP Client: Axios
- Analytics: PostHog
- Linting: ESLint
- Package Manager: pnpm
- CI/CD: GitHub Actions
- Deployment: Render.com (API), Expo EAS (Mobile)
- Containerization: Docker
- Database Hosting: PostgreSQL (via Docker or cloud provider)
For detailed API documentation with request/response examples and curl commands, see API Documentation.
project-root/
│
├── api/ # Backend API implementation
├── mobile/ # Mobile application source code
├── ci-scripts/ # Common CI/CD scripts
└── ... # Other supporting folders
- API Directory: Contains all files related to the backend API service for the DressMaster MVP.
- Mobile Directory: Houses the mobile app implemented for DressMaster MVP.
- CI Scripts: Scripts related to automated integration, testing, and deployment.
- Node.js 20 or higher
- pnpm (enabled via corepack)
- Docker and Docker Compose (for local database)
git clone https://github.com/Malahit/dressmaster-mvp.git
cd dressmaster-mvpThe easiest way to run PostgreSQL locally is using Docker Compose:
cd infra
docker-compose up -dThis will start a PostgreSQL 15 container with:
- Host:
localhost - Port:
5432 - Database:
dressmaster - User:
dressmaster - Password:
dressmaster
The database data will persist in a Docker volume named pgdata.
Alternative: Manual PostgreSQL Setup
If you prefer to install PostgreSQL manually:
- Install PostgreSQL 15 or higher
- Create a database named
dressmaster - Update your
.envfile with your database connection string
Database Connection String Format:
DATABASE_URL="postgresql://username:password@localhost:5432/dressmaster"
cd api
# Copy environment variables template
cp .env.example .env
# Update .env with your configuration
# DATABASE_URL=postgresql://dressmaster:dressmaster@localhost:5432/dressmaster
# JWT_SECRET=your-secret-key-here
# Install dependencies
pnpm install
# Generate Prisma client
pnpm prisma:generate
# Run database migrations
pnpm prisma:migrate
# (Optional) Seed the database with sample data
pnpm prisma:seed
# Start the development server
pnpm devThe API will be running at http://localhost:3000
API Management Commands:
pnpm lint # Run ESLint
pnpm test # Run tests
pnpm build # Build for production
pnpm start # Start production servercd mobile
# Copy environment variables template
cp .env.example .env
# Update .env with your API URL
# API_BASE_URL=http://localhost:3000 (or your deployed API URL)
# Install dependencies
pnpm install
# Start Expo development server
pnpm startMobile Development Commands:
pnpm start # Start Expo dev server
pnpm android # Run on Android emulator/device
pnpm ios # Run on iOS simulator/device
pnpm lint # Run ESLint
pnpm test # Run testsNote: For iOS development, you need a Mac with Xcode installed.
- API:
http://localhost:3000 - Mobile: Scan the QR code from Expo Go app or run on emulator/simulator
- API Health Check:
http://localhost:3000/health
To stop the PostgreSQL container:
cd infra
docker-compose downTo stop and remove the database data:
cd infra
docker-compose down -v- Purpose: Automate testing, linting, and deployment for the API service.
- Configuration: Defined in
.github/workflows/api-ci.yml - Triggers: Runs on
pushandpull_requestevents. - Steps:
- Lint code with ESLint
- Run tests with coverage check (80% threshold required)
- Deploy to Render.com free tier (only on
mainbranch)
- Requirements:
- GitHub Secret:
RENDER_DEPLOY_HOOK_URL(for automatic deployment)
- GitHub Secret:
- Purpose: Continuous integration and build pipeline for the Mobile application.
- Configuration: Defined in
.github/workflows/mobile-ci.yml - Triggers: Runs on
pushandpull_requestevents. - Steps:
- Lint code with ESLint
- Run tests
- Build mobile app with Expo EAS Build (only on
mainbranch)
- Requirements:
- GitHub Secret:
EXPO_TOKEN(for EAS Build authentication)
- GitHub Secret:
- Purpose: Dedicated deployment workflow for production API.
- Configuration: Defined in
.github/workflows/deploy-api.yml - Triggers: Runs on push to
mainbranch. - Steps:
- Trigger Render deployment via webhook
- Workflows are managed through GitHub Actions.
- Ensure any new features update their respective directories and workflows to automate validations.
- All secrets should be configured in the repository settings under Settings → Secrets and variables → Actions.
