Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .cursor/rules/bun.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: for installing any packages: USE BUN.
globs:
alwaysApply: false
---
Use bun for manipulating packages
6 changes: 0 additions & 6 deletions .cursor/rules/pnpm.mdc

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ next-env.d.ts

# Sentry Config File
.env.sentry-build-plugin

# Crush directory
.crush/
CRUSH.md
63 changes: 63 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# AGENTS.md

## Overview

This repository contains a Next.js application with a focus on AI-powered features, likely related to a chat or tutoring platform. Below is a breakdown of the key components and structure of the repo:

### Directory Structure

- **`app/`**: Contains the main application code, including API routes, actions, and pages.
- **`components/`**: Houses reusable UI components, organized into subdirectories like `auth/`, `messages/`, `settings/`, and `ui/`.
- **`hooks/`**: Custom React hooks for managing state and side effects.
- **`public/`**: Static assets like images, icons, and configuration files.
- **`supabase/`**: Supabase-related configurations and migrations.
- **`tests/`**: Test cases for the application.
- **`utils/`**: Utility functions and helpers, including AI-related logic, Supabase interactions, and more.
- **`assets/`**: Additional static assets.
- **`scripts/`**: Scripts for automation or data processing.
- **`fonts/`**: Custom font files.

### Key Files

- **`package.json`**: Lists dependencies and scripts for the project.
- **`bun.lock`**: Lockfile for managing exact dependency versions.
- **`tsconfig.json`**: TypeScript configuration.
- **`next.config.ts`**: Next.js configuration.
- **`biome.json`**: Biome configuration for code linting.
- **`postcss.config.js`**: PostCSS configuration for styling.
- **`vitest.config.ts`**: Vitest configuration for testing.

### Technologies Used

- **Next.js**: Framework for building the application.
- **TypeScript**: Language for type-safe development.
- **Supabase**: Backend service for database and authentication.
- **Stripe**: Payment processing.
- **Biome**: Tool for code linting and formatting.
- **bun**: Package manager and runtime.
- **Vitest**: Testing framework.

### Features

- **AI Integration**: Utilities for AI-powered features like conversation handling, prompts, and PDF processing.
- **Authentication**: Components and logic for user authentication, including OAuth providers like Google and Discord.
- **Settings Management**: Components for managing user settings, including account, security, subscription, and support settings.
- **Chat Interface**: Components for displaying AI and user messages in a chat-like interface.

### Testing

- The `tests/` directory contains test cases, including a setup file and specific tests like `pdfChat.test.ts`.
- The `vitest.config.ts` file configures the testing environment.

### Styling

- The application uses a combination of CSS and CSS-in-JS for styling.
- The `globals.css` file contains global styles, while individual components may have their own styling.

### Additional Notes

- The repository includes Docker configuration files (`Dockerfile` and `docker-compose.yaml`) for containerization.
- The `LICENSE` file indicates the project's licensing terms.
- The `README.md` and `CHANGELOG.md` files provide additional documentation and release notes.

This overview should help you understand the structure and purpose of the repository.
8 changes: 0 additions & 8 deletions CLAUDE.md

This file was deleted.

8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ RUN apk add --no-cache --virtual .gyp python3 build-base libc6-compat
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
COPY package.json bun.lock* yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
if [ -f bun.lock ]; then curl -fsSL https://bun.sh/install | bash && /root/.bun/bin/bun install --frozen-lockfile; \
elif [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
Expand All @@ -29,7 +30,8 @@ COPY . .


RUN \
if [ -f yarn.lock ]; then yarn run build; \
if [ -f bun.lock ]; then /root/.bun/bin/bun run build; \
elif [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
else echo "Lockfile not found." && exit 1; \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The tutor-gpt project is a Next.js application using the app router.
- `supabase/` - contains SQL scripts necessary for setting up local supabase
- `scripts/` - Lifecycle scripts that help setup and sync the project

We use [pnpm](https://pnpm.io/) for dependency management.
We use [bun](https://bun.sh/) for dependency management.

The project also makes use of several third party services

Expand All @@ -56,14 +56,14 @@ Clone the repo and install the necessary Node.js dependencies

```bash
git clone https://github.com/plastic-labs/tutor-gpt.git && cd tutor-gpt
pnpm install
bun install
```

Set up your [environment variables](#environment-variables) in a `.env.local`
file. Then launch the development server.

```bash
pnpm run dev
bun run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Expand Down
Loading