NutriFix is a health application that transforms your blood test results into personalized daily meal plans and lifestyle tips. By uploading or entering lab data, the app analyzes key biomarkers to detect deficiencies and suggests actionable improvements, allowing you to track progress over time.
- Frontend: React, Vite, TailwindCSS
- Backend: Node.js, Express.js
- Database: PostgreSQL (Neon Serverless), Drizzle ORM
- Authentication: Auth0
- AI Integration: Mistral AI (for analysis and recipe recommendations)
The repository is structured as a monorepo containing both the frontend and backend:
frontend/: The React application built with Vite.backend/: The Node.js/Express server that serves the API and the statically built frontend.shared/: Shared TypeScript schemas and types used by both frontend and backend (e.g., Drizzle schema).
npm installCreate a .env file in the root directory and populate it with the following required variables:
# Database
DATABASE_URL=your_neon_postgres_url
# Authentication (Auth0)
AUTH0_SECRET=your-auth0-secret
AUTH0_BASE_URL=http://localhost:5050
AUTH0_ISSUER_BASE_URL=https://your-tenant.auth0.com
AUTH0_CLIENT_ID=your-auth0-client-id
AUTH0_CLIENT_SECRET=your-auth0-client-secret
# Server Configuration
SESSION_SECRET=your-secure-session-secretPush the Drizzle schema to your database:
npm run db:pushnpm run devThis command concurrently starts the Vite dev server for the frontend and the tsx watcher for the backend API. The app will be available at http://localhost:5050.
The project is designed to be deployed as a monolithic application where the Express backend serves the pre-built React frontend. This makes it easily deployable on platforms like Render, Heroku, or standard VPS environments.
npm run buildThis script will build the Vite frontend into dist/public and bundle the Express backend using esbuild into dist/index.js.
# Ensure you set NODE_ENV=production and all production environment variables
npm start- Provide all production Environment Variables (including
CLIENT_URLandNODE_ENV=production). - Run database migrations/schema push on your production database.
- Use
npm installandnpm run buildduring the deployment step. - Run
npm startas your start command.
MIT