A Next.js frontend for the Fitness Quest app. This app connects to a Node.js/Express backend powered by Prisma and PostgreSQL, allowing users to register, log in, and follow structured workout programs.
- Features
- Tech Stack
- Getting Started
- Environment Variables
- Available Scripts
- Folder Structure
- API Integration
- License
- User registration and login with JWT authentication
- Connects to a Node.js/Express backend API
- Fetches workout programs and user progress
- Fully responsive and mobile-friendly interface
- Next.js – React framework for server-side rendering and static sites
- TypeScript – Static type checking
- Tailwind CSS or Bootstrap – UI styling
- Fetch API or Axios – For API requests
- JWT authentication – Secure login
- ESLint & Prettier – Code formatting and linting
git clone https://github.com/your-username/fitness-quest-frontend.git
cd fitness-quest-frontendnpm installCreate a .env.local file in the root:
NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_API_URLshould point to your backend API.
npm run devThe frontend should now be running on http://localhost:3000.
npm run dev– Runs the app in development modenpm run build– Builds the app for productionnpm start– Starts the production servernpm run lint– Runs ESLint to check code qualitynpm run format– Formats code with Prettier
.
├── public/ # Static files (images, fonts, icons)
├── src/
│ ├── app/ # Next.js app directory (pages or app router)
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # API calls, helper functions
│ └── styles/ # Global CSS / Tailwind configs
├── .env.local # Environment variables
├── package.json
├── tsconfig.json
└── next.config.js
- All API calls are made to the Node.js/Express backend.
- Authentication uses JWT tokens, which should be stored in
localStorageorcookies. - Example usage:
import { loginUser } from '../utils/api';
const response = await loginUser(email, password);
console.log(response.token);MIT License © 2025 Fitness Quest