Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:

Node.js

Version 18.x or higher

npm

Version 9.x or higher
You can verify your installations by running node --version and npm --version in your terminal.

Installation

1

Clone the Repository

git clone https://github.com/example/healthcare-platform.git
cd healthcare-platform
2

Install Dependencies

npm install
3

Configure Environment

Create a .env file in the root directory:
cp .env.example .env
Update the environment variables:
API_URL=http://localhost:3000
AUTH_DOMAIN=your-auth-domain
AUTH_CLIENT_ID=your-client-id
4

Start Development Server

npm start
The application will be available at http://localhost:4200
Success! You should now see the login page at http://localhost:4200

Project Structure

healthcare-platform/
├── src/
│   ├── app/
│   │   ├── components/     # Shared UI components
│   │   ├── pages/          # Page components
│   │   ├── services/       # Angular services
│   │   ├── models/         # TypeScript interfaces
│   │   └── pipes/          # Custom pipes
│   ├── assets/             # Static assets
│   └── environments/       # Environment configs
├── docs/                   # Documentation
└── package.json

Key Concepts

Pages vs Components

Pages are routable components that represent full views in the application:
PageDescription
DashboardComponentMain landing page
PatientsListComponentPatient directory
PatientDetailComponentIndividual patient view
MessagesComponentMessaging interface
Pages are located in src/app/pages/

Services

Services manage application state and API communication:
// Example: PatientService
@Injectable({ providedIn: 'root' })
export class PatientService {
  private patients$ = new BehaviorSubject<Patient[]>([]);
  
  getPatients(): Observable<Patient[]> {
    return this.patients$.asObservable();
  }
  
  getPatientById(id: string): Patient | undefined {
    return this.patients$.value.find(p => p.id === id);
  }
}

Routing

The application uses Angular Router with the following main routes:
RouteComponentDescription
/dashboardDashboardComponentMain dashboard
/patientsPatientsListComponentPatient list
/patients/:idPatientDetailComponentPatient detail
/messagesMessagesComponentMessaging
/alertsAlertsComponentAlert management
/risk-scoringRiskDashboardComponentRisk analytics
/care-teamCareTeamDashboardComponentTeam collaboration
/settingsSettingsComponentOrganization settings

First Steps

Development Commands

# Start development server
npm start

# Run tests
npm test

# Build for production
npm run build

# Lint code
npm run lint

# Format code
npm run format

Common Tasks

  1. Create component in src/app/pages/
  2. Add route in app.routes.ts
  3. Add navigation link in sidebar
  1. Generate with ng generate service services/my-service
  2. Add to providers if not using providedIn: 'root'
  3. Inject in components as needed
  1. Create in src/app/components/
  2. Export from component module
  3. Import in consuming components
  1. Use Tailwind utility classes directly
  2. Custom styles in styles.scss
  3. Theme colors defined in tailwind.config.js

Troubleshooting

If you encounter issues, try these common solutions first.
IssueSolution
Port 4200 in useUse npm start -- --port 4201
Dependencies failDelete node_modules and run npm install
Build errorsCheck TypeScript version compatibility
Styles not loadingVerify Tailwind config and imports

Next Steps

Congratulations! You’ve set up the Healthcare Platform locally.
Continue exploring:
  1. Review the Features for detailed feature documentation
  2. Check the API Reference for backend integration
  3. Understand the Architecture for system design
  4. Browse Design Specifications for UI/UX details