This guide explains how to set up and run the Eat Better project on macOS.
Before starting, ensure you have the following installed:
- Git: Install Git or use
brew install git. - .NET 9.0 SDK: Download .NET 9.0
- Verify installation:
dotnet --version
- Verify installation:
- Node.js & npm: Download Node.js (LTS recommended) or use
brew install node.- Verify installation:
node -vandnpm -v
- Verify installation:
git clone <repository_url>
cd eat-betterAntigravity is your AI coding assistant. You can use it to help develop features, debug code, or understand the project.
- Chat: Open the AI chat panel to ask questions or request changes (e.g., "Add a new page for users").
- Context: Antigravity uses your open files as context. Open the file you want to discuss to get better results.
- Commands: You can ask it to run terminal commands, create files, or refactor code directly.
The backend is built with ASP.NET Core.
- Navigate to the backend directory:
cd backend - Start the server:
dotnet run
- The backend will start on http://localhost:5265. All API requests are handled here.
The frontend is a Vite + React + TypeScript application.
- Navigate to the frontend directory:
cd frontend - Install dependencies (first time only):
npm install
- Start the development server:
npm run dev
- Open your browser to http://localhost:5173.
This project is configured to run as a single Docker container containing both Backend and Frontend.
docker build -t eat-better-app .To ensure your database survives container restarts (updates), you must use a volume mapped to /app/data.
# Create a data directory on your host
mkdir -p ~/eat-better-data
# Run the container
docker run -d \
--name eat-better \
--restart unless-stopped \
-p 80:8080 \
-v ~/eat-better-data:/app/data \
-e ConnectionStrings__DefaultConnection="Data Source=data/cms.db" \
eat-better-appTo update the app:
git pulldocker build -t eat-better-app .docker stop eat-better && docker rm eat-better- Run the
docker runcommand again.
- Address already in use: If you see an error about port 5265 or 5173 being in use:
- Find the process:
lsof -i :5265 - Kill it:
kill -9 <PID>
- Find the process: