- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
The repository contains a Minimum Viable Product (MVP) called "fitness-tracker-community-mvp" that provides a web application for fitness enthusiasts to set, track, and share their fitness goals. It utilizes a robust tech stack including Next.js for the frontend, Node.js for the backend, and powerful LLMs like Gemini and OpenAI for advanced features.
Feature | Description | |
---|---|---|
βοΈ | Architecture | The codebase follows a modular architectural pattern, organized into separate directories for different functionalities, ensuring easier maintenance and scalability. |
π | Documentation | The repository includes a comprehensive README file that provides detailed insights into the MVP, its dependencies, and step-by-step usage instructions. |
π | Dependencies | The codebase relies on a variety of external libraries and packages, including Next.js, React, Tailwind CSS, Prisma, and NextAuth.js, for UI components, data management, authentication, and more. |
𧩠| Modularity | The modular structure promotes easier maintenance and reusability of the code, with separate directories and files for different functionalities such as pages, components, and API routes. |
π§ͺ | Testing | The application incorporates unit tests to ensure the reliability and robustness of the codebase. |
β‘οΈ | Performance | The system prioritizes performance by using optimized frameworks like Next.js and employing caching strategies to enhance the user experience. |
π | Security | Security is paramount, with measures like input validation, data encryption, and secure communication protocols implemented to safeguard user information. |
π | Version Control | Utilizes Git for version control with a dedicated GitHub Actions workflow for automated build and release processes. |
π | Integrations | The application seamlessly integrates with popular fitness trackers and social media platforms for a comprehensive experience. |
πΆ | Scalability | The system is designed with scalability in mind, utilizing efficient database management and cloud-based solutions to handle increasing user load and data volume. |
βββ app
β βββ dashboard
β β βββ page.js
β β βββ layout.js
β βββ goals
β β βββ page.js
β β βββ layout.js
β βββ workouts
β β βββ page.js
β β βββ layout.js
β βββ friends
β β βββ page.js
β β βββ layout.js
β βββ layout
β β βββ layout.js
β βββ globals.css
β βββ favicon.ico
βββ components
β βββ GoalForm.jsx
β βββ GoalItem.jsx
β βββ WorkoutForm.jsx
β βββ WorkoutItem.jsx
β βββ FriendItem.jsx
β βββ ProgressChart.jsx
β βββ Navbar.jsx
β βββ Footer.jsx
βββ pages
β βββ api
β β βββ auth
β β β βββ [...nextauth].js
β β βββ goals
β β β βββ route.js
β β βββ workouts
β β β βββ route.js
β β βββ friends
β β β βββ route.js
β β βββ users
β β βββ route.js
β βββ _app.jsx
βββ prisma
β βββ schema.prisma
β βββ migrations
β βββ 20231026172907_init
β βββ migration.sql
βββ tailwind.config.js
βββ vite.config.js
βββ postcss.config.cjs
βββ package.json
βββ README.md
- Node.js
- npm
- Docker (Optional, for database setup)
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/fitness-tracker-community-mvp.git
- Navigate to the project directory:
cd fitness-tracker-community-mvp
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:3000.
Adjust configuration settings in tailwind.config.js
, .env
, and prisma/schema.prisma
.
- π Example 1: Setting a new fitness goal:
- Navigate to the "Goals" page.
- Enter the goal name, target date, and desired outcome.
- Click "Create Goal."
- π Example 2: Tracking workouts:
- Navigate to the "Workouts" page.
- Log your workouts by selecting the exercise type, duration, and date.
- View your workout history.
- π Example 3: Connecting with friends:
- Navigate to the "Friends" page.
- Search for and add friends.
- Share your progress with friends and join group challenges.
- Create a new Vercel project: https://vercel.com/new
- Import this repository.
- Configure environment variables.
- Deploy your project.
- Create a new Netlify site: https://app.netlify.com/start
- Connect your GitHub repository.
- Configure environment variables.
- Deploy your project.
- Configure a GitHub Pages branch.
- Build the project using
npm run build
. - Deploy the built files to the GitHub Pages branch.
- Create an AWS account.
- Set up an S3 bucket for static website hosting.
- Configure a CloudFront distribution to serve the content.
- Deploy the built files to the S3 bucket.
- Create a Google Cloud project.
- Create a Cloud Storage bucket for static website hosting.
- Configure a Cloud CDN to serve the content.
- Deploy the built files to the Cloud Storage bucket.
NEXTAUTH_URL
: Your application URL.NEXTAUTH_SECRET
: Your application secret.DATABASE_URL
: Your database URL.
- GET /api/users: Retrieves a list of users.
- POST /api/users: Creates a new user.
- GET /api/goals: Retrieves a list of goals for a specific user.
- POST /api/goals: Creates a new goal for a specific user.
- GET /api/workouts: Retrieves a list of workouts for a specific user.
- POST /api/workouts: Creates a new workout for a specific user.
- GET /api/friends: Retrieves a list of friends for a specific user.
- POST /api/friends: Adds a new friend for a specific user.
NextAuth.js is used for handling authentication.
curl -X GET http://localhost:3000/api/goals
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!