HealthTrack is a comprehensive health information system designed for healthcare professionals to manage clients, health programs, and track client enrollments in these programs.
- User Authentication: Secure login and registration system
- Client Management: Register and track clients with detailed information
- Program Administration: Create and manage health programs
- Enrollment Tracking: Enroll clients in programs and track their participation
- Client Profiles: View comprehensive client information including program enrollments
- Dashboard: Overview of system statistics and recent activities
- Responsive Design: Works on desktop, tablet, and mobile devices
- Frontend: React, TypeScript, TailwindCSS, shadcn/ui components
- Backend: Node.js, Express.js
- Database: PostgreSQL with Drizzle ORM
- Authentication: Passport.js with local strategy
- Form Handling: React Hook Form with Zod validation
- API Communication: TanStack Query
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/fnabwire/HealthCare-IMS.git cd HealthCare-IMS -
Install dependencies:
npm install
-
Set up environment variables by creating a
.envfile in the root directory:# Database configuration DATABASE_URL=postgresql://username:password@localhost:5432/HealthCare-IMS # Session secret (generate a random string) SESSION_SECRET=your_session_secret_here -
Push the database schema:
npm run db:push
-
Start the development server:
npm run dev
-
Access the application at
http://localhost:5000
After setup, the system will automatically create an admin user:
- Username:
admin - Password:
password
You should change this password after first login for security reasons.
-
/client: Frontend React application/src/components: Reusable UI components/src/hooks: Custom React hooks/src/lib: Utility functions and API client/src/pages: Page components for different routes
-
/server: Backend Express application/auth.ts: Authentication setup with Passport.js/db.ts: Database connection/routes.ts: API route definitions/storage.ts: Data access layer
-
/shared: Code shared between frontend and backend/schema.ts: Database schema definitions with Drizzle
The API follows RESTful conventions and includes endpoints for:
- Auth:
/api/login,/api/register,/api/logout,/api/user - Programs:
/api/programs,/api/programs/:id,/api/programs/stats - Clients:
/api/clients,/api/clients/:id,/api/clients/:id/details - Enrollments:
/api/enrollments,/api/clients/:clientId/enrollments - Visits:
/api/visits,/api/clients/:clientId/visits - Notes:
/api/notes,/api/clients/:clientId/notes - Stats:
/api/stats
The project uses Drizzle ORM's push system for database schema changes:
npm run db:push- Define the data model in
shared/schema.ts - Update the storage interface in
server/storage.ts - Add API routes in
server/routes.ts - Create UI components in
client/src/components - Add pages in
client/src/pagesand register them inApp.tsx
here are some screen shots of the app and vidoe recording of how it works: