A comprehensive health monitoring application built with React and Express that allows users to track daily health metrics including sleep, nutrition, exercise, hydration, and mood.
- Health Tracking: Daily metrics for sleep, nutrition, exercise, hydration, and mood
- User Authentication: Email/password authentication system
- Data Visualization: Charts and insights for health trends
- Diary System: Personal diary entries with mood tracking
- Calendar View: Monthly overview of health data
- Responsive Design: Works on desktop, tablet, and mobile devices
- React 18 with TypeScript
- Radix UI with shadcn/ui components
- Tailwind CSS for styling
- TanStack Query for state management
- Wouter for routing
- Recharts for data visualization
- Express.js with TypeScript
- PostgreSQL with Drizzle ORM
- Session-based authentication
- RESTful API endpoints
- Node.js 20+
- PostgreSQL database
- npm or yarn
- Clone the repository:
git clone <your-repo-url>
cd healthly- Install dependencies:
npm install- Set up environment variables:
Create a
.envfile in the root directory:
# Supabase Database Configuration
DATABASE_URL=postgresql://postgres:your-password@db.kwwhtilkkvhcnlxwaqos.supabase.co:5432/postgres
# Session Secret (generate a secure random string)
SESSION_SECRET=your-secure-session-secret-here- Set up the database:
npm run db:push- Start the development server:
npm run devThe application will be available at http://localhost:5000
- Build the Docker image:
docker build -t healthly .- Run the container:
docker run -p 5000:5000 \
-e DATABASE_URL="your-database-url" \
-e SESSION_SECRET="your-session-secret" \
healthly- Build the application:
npm run build-
Set environment variables on your hosting platform:
DATABASE_URL: Your PostgreSQL connection stringSESSION_SECRET: A secure random string for session encryptionPORT: (Optional) Port number (defaults to 5000)
-
Start the production server:
npm startThe application uses PostgreSQL with Drizzle ORM. You can use any PostgreSQL provider:
- Supabase: Create a project and use the connection string
- Neon: Serverless PostgreSQL
- Railway: PostgreSQL hosting
- Self-hosted: Your own PostgreSQL instance
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Yes |
SESSION_SECRET |
Secret key for session encryption | Yes |
PORT |
Server port (default: 5000) | No |
NODE_ENV |
Environment (development/production) | No |
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run check- Type checkingnpm run db:push- Push database schema changes
├── client/ # Frontend React application
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ └── lib/ # Utility functions
├── server/ # Backend Express application
│ ├── routes.ts # API routes
│ ├── auth.ts # Authentication logic
│ ├── db.ts # Database connection
│ └── storage.ts # Data storage interface
├── shared/ # Shared types and schemas
│ └── schema.ts # Database schema definitions
└── dist/ # Built application (generated)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details