Skip to main content

Prerequisites

Before getting started, ensure you have the following installed:
  • Node.js (>=18)
  • npm or yarn
  • Git

Installation

Clone the repository and install dependencies:
git clone <repository-url>
cd adhd-simple-turborepo
npm install --legacy-peer-deps
Use --legacy-peer-deps flag to resolve any peer dependency conflicts in the monorepo

Running Applications

You have two main options for running the applications during development: Turbo provides orchestrated development across the entire monorepo. Run all applications:
npm run dev
Run specific applications:
# Clinical dashboard only
npm run dev:clinical

# Mobile app only
npm run dev:mobile

# Mobile app for web development
npm run dev:mobile:web

# Mobile app for Android development
npm run dev:mobile:android

# Mobile app for iOS development
npm run dev:mobile:ios

Option 2: Running Apps Separately

If you prefer to run applications individually or encounter issues with Turbo:

Clinical Dashboard

cd apps/clinical
npm run dev
The clinical dashboard will be available at http://localhost:5173 Alternative start command:
cd apps/clinical
npm start

Mobile Application

cd apps/mobile
npx expo start
Alternative start command:
cd apps/mobile
npm start
Platform-specific development:
cd apps/mobile

# Web development
npx expo start --web

# Android development (requires Android Studio/emulator)
npx expo start --android

# iOS development (requires Xcode - macOS only)
npx expo start --ios

Application URLs

When running successfully, applications will be available at:
  • Clinical Dashboard: http://localhost:5173
  • Mobile App (Web): http://localhost:8081 (via Expo)
  • Documentation: http://localhost:3000 (when running documentation app)

Troubleshooting

Common Issues

Peer dependency conflicts:
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install --legacy-peer-deps
Turbo cache issues:
# Clear Turbo cache
npx turbo clean
Mobile app not starting:
cd apps/mobile
# Clear Expo cache
npx expo start --clear

Environment Variables

Make sure you have the required environment variables set up:
  • Create .env files in each app directory as needed
  • Check with your team for the required environment variables

Development Tools

Recommended VS Code extensions:
  • TypeScript and JavaScript Language Features
  • Expo Tools
  • Prettier - Code formatter
  • ESLint

Next Steps

Once your development environment is running:
  1. Clinical Dashboard: Visit the Clinical User Guides to understand the application flow
  2. Mobile App: Check the Mobile Architecture documentation
  3. Backend: Review the Edge Functions Architecture for API development

Clinical User Guides

Learn how to use the clinical dashboard

Technical Architecture

Understand the system architecture

Mobile Development

Mobile app development guide

Database Schema

Backend database structure