Skip to content

A social platform to talk to your fitness friends and leverage AI chatbots to help you reach your fitness goals. Built using Next.js and deployed to AWS using Terraform

Notifications You must be signed in to change notification settings

OSUMed/fitchatly-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fitchatly

Live Demo

This project is a web application built with Next.js, likely functioning as an AI-powered chat application or similar tool, utilizing the Vercel AI SDK and OpenAI models. It features user authentication, a database layer managed by Prisma, and UI components from Shadcn/ui. The application is containerized using Docker and includes configuration for deployment on AWS ECS using Terraform.

Features

  • AI-powered chat interface
  • User authentication (e.g., email/password, social logins)
  • Database storage for chat history/user data
  • Responsive design
  • (Add more features specific to your app)

Key Technologies

  • Framework: Next.js 15
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: Shadcn/ui (using Radix UI)
  • AI Integration: Vercel AI SDK (@ai-sdk/openai, ai)
  • Authentication: NextAuth.js
  • Database ORM: Prisma
  • Validation: Zod
  • Forms: React Hook Form
  • Deployment: Docker, AWS ECS, Terraform

Prerequisites

  • Node.js (Check .nvmrc or package.json engines field if available for specific version)
  • npm or pnpm (pnpm recommended based on pnpm-lock.yaml)
  • Docker (for containerized development/deployment)
  • Access to a database supported by Prisma (e.g., PostgreSQL - verify in prisma/schema.prisma)
  • AWS Credentials (for deployment using Terraform/AWS scripts)
  • API Keys for external services (e.g., OpenAI)

Setup

  1. Clone the repository:

    git clone <your-repository-url> # Replace with your repo URL
    cd my-v0-project # Replace with your project directory name
  2. Install dependencies:

    # Using pnpm (recommended)
    pnpm install
    
    # Or using npm
    # npm install
  3. Set up environment variables:

    • Copy the example environment file if one exists to .env:
      cp .env.example .env # Create .env.example if it doesn't exist
    • Fill in the required environment variables in .env. Key variables likely include:
      • DATABASE_URL: Connection string for your Prisma database (e.g., PostgreSQL).
      • NEXTAUTH_URL: The canonical URL of your deployment (e.g., http://localhost:3000 for dev, https://fitchatly.com for prod).
      • NEXTAUTH_SECRET: A secret string for NextAuth.js token encryption (generate one using openssl rand -base64 32).
      • OPENAI_API_KEY: Your API key for OpenAI.
      • (Optional) Authentication provider keys (e.g., GITHUB_ID, GITHUB_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET).
      • (Optional) AWS credentials if needed by the application runtime (though often handled via IAM roles in ECS).
    • Note: Consult .env.example, auth.ts, prisma/schema.prisma, and deployment scripts for the definitive list.
  4. Set up the database:

    • Ensure your database server (e.g., PostgreSQL) is running and accessible.
    • Apply database migrations:
      pnpm prisma migrate dev
      # or npx prisma migrate dev
    • Generate Prisma Client:
      pnpm prisma generate
      # or npx prisma generate
    • (Optional) Seed the database:
      pnpm run prisma:seed
      # or npm run prisma:seed
      (Note: Check prisma/seed.js or prisma/seed.ts)

Running the Application

Development

pnpm run dev
# or npm run dev

Access at http://localhost:3000.

Production Build

pnpm run build
# or npm run build

pnpm run start
# or npm run start

Docker

  1. Build: docker build -t my-v0-project .
  2. Run: docker-compose up -d (Check docker-compose.yml for services and configuration)

Testing

# Example command - replace if needed
pnpm run test
# or npm run test

(Add details about your specific testing setup if applicable)

Deployment

Deployment uses Docker and AWS ECS, orchestrated potentially via Terraform and helper scripts.

  • Containerization: See Dockerfile.
  • Infrastructure: See terraform/ directory.
  • Task Definition: See task-definition.json.
  • Deployment Scripts: See terraform_deploy.sh and aws-scripts/.

Refer to these files for specific deployment steps and AWS configuration requirements.

Linting

pnpm run lint
# or npm run lint

Project Structure (High-Level)

.
├── app/             # Next.js App Router
├── components/      # Shared UI components
├── lib/             # Utility functions
├── prisma/          # Prisma schema, migrations, seed
├── public/          # Static assets
├── styles/          # Global styles
├── aws-scripts/     # AWS helper scripts
├── terraform/       # Terraform IaC files
├── .github/         # GitHub Actions workflows (if any)
├── auth.ts          # NextAuth.js config
├── middleware.ts    # Next.js middleware
├── next.config.mjs  # Next.js config
├── package.json     # Dependencies & scripts
├── Dockerfile       # Container definition
├── docker-compose.yml # Local Docker orchestration
├── schema.sql       # DB schema (if not solely Prisma)
├── tsconfig.json    # TypeScript config
└── README.md        # This file

Contributing

Contributions are welcome! Please follow standard fork & pull request workflows. Ensure code is linted and tests pass. Consider creating an issue first to discuss changes.

Contact / Support

  • For issues or feature requests, please use the GitHub Issues page.

License

Specify the project license here (e.g., MIT, Apache 2.0). If unlicensed, state that.

About

A social platform to talk to your fitness friends and leverage AI chatbots to help you reach your fitness goals. Built using Next.js and deployed to AWS using Terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •