MacroManage is a full-stack web application designed to help users track their food intake and weight, with features like secure login, password recovery, and detailed logs. Users can monitor their daily nutrition and weight progress over time.
You can try the live application here: MacroManage
- Food Database: Database with thousands of food items sourced from the USDA database.
- Track food intake: Log your meals and monitor your daily nutritional breakdown (calories, protein, carbs, fats).
- Change nutrition goals: Customize and set your own nutrition goals based on your dietary needs.
- Weight tracking: Record your weight regularly and monitor your progress over time.
- Login and authentication: Secure login features including email/password authentication, and password recovery.
- Forgot password: If a user forgets their password, they can reset it via an email link.
- Responsive design: Fully responsive, optimized for both desktop and mobile devices.
- React.js: Handles the dynamic user interface and front-end logic.
- Netlify: Frontend is hosted on Netlify for fast, global access.
- Node.js: Backend for handling API requests and business logic.
- Express.js: Serves the API routes and handles backend processes.
- PostgreSQL: Database for storing user data, food logs, and weight logs.
- JWT (JSON Web Tokens): Used for secure user authentication.
- Nodemailer: Integrated with email services for "Forgot Password" functionality.
To run the application locally, follow these steps:
- Node.js installed
- PostgreSQL database running locally or remotely
-
Clone the repository: git clone https://github.com/your-username/macromanage.git
-
Navigate to backend folder: cd macromanage/backend
-
Install backend dependencies: npm install
-
Create a .env in the backend folder and add your environment variables: PORT=5000 DATABASE_URL=your-postgresql-connection-string JWT_SECRET=your-jwt-secret EMAIL_USER=[email protected] EMAIL_PASS=your-email-password
-
Start backend server: node index.js
-
Navigate to root folder "macromanage'
-
Install frontend devepencies: npm install
-
Create a .env in the root folder and add your environment variables: REACT_APP_API_URL=http://localhost:5000
-
Start frontend: npm start
-
Visit http://localhost:3000 to use the application.
- Navigate the login page on top right.
- Click on sign up
- Enter the required information, including your email, password, and any other necessary details.
- Submit the form to create your account.
- After successful registration, you will be redirected to the login page.
- Navigate to the login page.
- Enter your registered email and password.
- Click the "Login" button to access your account.
- Sign in to the application.
- Navigate to the "Food Log" section.
- Add meals, specifying the food items and their respective nutritional information (calories, protein, carbs, fats).
- Track daily intake and see how it compares to your nutrition goals.
- Go to the "Weight Log" section.
- Enter your current weight for the day.
- View weight progress over time through the visual weight tracker.
- Navigate to the "Nutrition Goals" section.
- Set your desired calorie and macro goals.
- Save changes to update your nutrition goals accordingly.
- On the login page, click "Forgot Password."
- Enter your email to receive a password reset link.
- Follow the link in your email to reset your password securely. (Usually in the spam folder)