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.
- 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)
- 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
- Node.js (Check
.nvmrcorpackage.jsonengines 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)
-
Clone the repository:
git clone <your-repository-url> # Replace with your repo URL cd my-v0-project # Replace with your project directory name
-
Install dependencies:
# Using pnpm (recommended) pnpm install # Or using npm # npm install
-
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:3000for dev,https://fitchatly.comfor prod).NEXTAUTH_SECRET: A secret string for NextAuth.js token encryption (generate one usingopenssl 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.
- Copy the example environment file if one exists to
-
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:
(Note: Check
pnpm run prisma:seed # or npm run prisma:seedprisma/seed.jsorprisma/seed.ts)
pnpm run dev
# or npm run devAccess at http://localhost:3000.
pnpm run build
# or npm run build
pnpm run start
# or npm run start- Build:
docker build -t my-v0-project . - Run:
docker-compose up -d(Checkdocker-compose.ymlfor services and configuration)
# Example command - replace if needed
pnpm run test
# or npm run test(Add details about your specific testing setup if applicable)
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.shandaws-scripts/.
Refer to these files for specific deployment steps and AWS configuration requirements.
pnpm run lint
# or npm run lint.
├── 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
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.
- For issues or feature requests, please use the GitHub Issues page.
Specify the project license here (e.g., MIT, Apache 2.0). If unlicensed, state that.