- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
The repository contains a Minimum Viable Product (MVP) called "fitness-goal-tracker-web-app" that provides a comprehensive solution using the following tech stack: Next.js, React, JavaScript, HTML, CSS, Node.js, and Custom LLMs including Gemini and OpenAI. It aims to empower fitness enthusiasts to set, track, and share their fitness goals.
Feature | Description | |
---|---|---|
βοΈ | Architecture | The codebase follows a modular architectural pattern with separate directories for different functionalities, ensuring easier maintenance and scalability. |
π | Documentation | The repository includes a README file that provides a detailed overview of the MVP, its dependencies, and usage instructions. |
π | Dependencies | The codebase relies on various external libraries and packages such as React, uuid, esbuild, and eslint, which are essential for building and styling the UI components, and handling external services. |
𧩠| Modularity | The modular structure allows for easier maintenance and reusability of the code, with separate directories and files for different functionalities such as background, components, and content. |
π§ͺ | Testing | Implement unit tests using frameworks like Jest or React Testing Library to ensure the reliability and robustness of the codebase. |
β‘οΈ | Performance | The performance of the system can be optimized based on factors such as the browser and hardware being used. Consider implementing performance optimizations for better efficiency. |
π | Security | Enhance security by implementing measures such as input validation, data encryption, and secure communication protocols. |
π | Version Control | Utilizes Git for version control with GitHub Actions workflow files for automated build and release processes. |
π | Integrations | Interacts with browser APIs, external services through HTTP requests, and includes integrations with speech recognition and synthesis APIs. |
πΆ | Scalability | Design the system to handle increased user load and data volume, utilizing caching strategies and cloud-based solutions for better scalability. |
βββ pages
βββ _app.tsx
βββ index.tsx
βββ goals
βββ new.tsx
βββ [id].tsx
βββ activities
βββ new.tsx
βββ profile
βββ index.tsx
βββ api
βββ auth
βββ [...nextauth].js
βββ register.js
βββ goals
βββ [id].js
βββ index.js
βββ activities
βββ index.js
βββ users
βββ [id].js
βββ components
βββ Header.tsx
βββ Footer.tsx
βββ GoalCard.tsx
βββ ActivityCard.tsx
βββ GoalForm.tsx
βββ ActivityForm.tsx
βββ LoginForm.tsx
βββ RegisterForm.tsx
βββ ProfileCard.tsx
βββ Button.tsx
βββ styles
βββ globals.css
βββ utils
βββ helpers.ts
βββ constants.ts
βββ prisma
βββ schema.prisma
βββ next.config.js
βββ tailwind.config.js
βββ README.md
- Node.js
- npm
- Docker
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/fitness-goal-tracker-web-app.git
- Navigate to the project directory:
cd fitness-goal-tracker-web-app
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:3000.
Adjust configuration settings in next.config.js
or .env
.
- π Example 1: Setting a new goal:
- Navigate to the "Goals" section.
- Click on "New Goal" to create a new fitness goal.
- Enter the goal's name, target value, and deadline.
- Click on "Create Goal" to save the goal.
- π Example 2: Logging a new activity:
- Navigate to the "Activities" section.
- Click on "New Activity" to log a new workout.
- Select the activity type, duration, and calories burned.
- Click on "Log Activity" to save the activity.
- π Example 3: Viewing progress on a goal:
- Navigate to the "Goals" section.
- Click on a specific goal to view its details.
- The goal card will display the progress bar and other relevant information.
- Login to Vercel:
vercel login
- Initialize Vercel project:
vercel init
- Deploy the code:
vercel deploy
- Create a Netlify account:
https://app.netlify.com/signup
- Create a new Netlify site:
netlify init
- Deploy the code:
netlify deploy
- Create a new GitHub repository for the project.
- Configure GitHub Pages in the repository settings:
https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
- Push the code to the repository.
- Create an AWS account:
https://aws.amazon.com/
- Create an S3 bucket to store the website files.
- Configure CloudFront for serving the website content.
- Deploy the code to the S3 bucket.
- Create a Google Cloud account:
https://cloud.google.com/
- Create a Cloud Storage bucket to store the website files.
- Configure Cloud CDN for serving the website content.
- Deploy the code to the Cloud Storage bucket.
NEXT_PUBLIC_GOOGLE_CLIENT_ID
: Google OAuth Client IDNEXT_PUBLIC_GOOGLE_CLIENT_SECRET
: Google OAuth Client SecretDATABASE_URL
: PostgreSQL database connection URL
- GET /api/users/[id]: Retrieves a user's profile.
- POST /api/auth/register: Registers a new user.
- GET /api/goals: Retrieves a list of goals for the current user.
- POST /api/goals: Creates a new goal for the current user.
- GET /api/goals/[id]: Retrieves details of a specific goal.
- PUT /api/goals/[id]: Updates a specific goal.
- DELETE /api/goals/[id]: Deletes a specific goal.
- GET /api/activities: Retrieves a list of activities for the current user.
- POST /api/activities: Creates a new activity for the current user.
- GET /api/activities/[id]: Retrieves details of a specific activity.
- PUT /api/activities/[id]: Updates a specific activity.
- DELETE /api/activities/[id]: Deletes a specific activity.
Uses NextAuth.js for authentication and authorization, supporting multiple providers such as Google, Facebook, and Email/Password.
curl -X GET http://localhost:3000/api/goals
- Retrieve a list of goals for the current user.curl -X POST http://localhost:3000/api/goals -H "Content-Type: application/json" -d '{"name": "Lose 10 pounds", "target": 10, "deadline": "2024-06-01T00:00:00.000Z"}'
- Create a new goal for the current user.
This MVP is licensed under the GNU AGPLv3.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!