-
Notifications
You must be signed in to change notification settings - Fork 1
Inngest ,AI SDK and Pinecone setup complete #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
73190fa
c54bee9
e5da2ac
07e6bf3
83e57f2
a9cd716
9f73a28
9e5d620
7ce6c1f
fa6a996
3ff988f
239fe48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "yaml.schemas": { | ||
| "https://raw.githubusercontent.com/microsoft/vscode-github-actions/main/schema/github-workflow.json": ".github/workflows/*" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Contributing to CodeTurtle | ||
|
|
||
| Thank you for considering contributing — we welcome and appreciate your help! | ||
|
|
||
| Please read these guidelines before opening issues or PRs to make the process fast and friendly for everyone. | ||
|
|
||
| ## Code of Conduct | ||
| Read and follow `CODE_OF_CONDUCT.md`. Be respectful and constructive. | ||
|
|
||
| ## How to Contribute | ||
| - For bugs: open an issue with a reproducible example, environment, and expected vs actual behavior. | ||
| - For feature ideas: open an issue describing the problem, the proposed solution, and any alternatives. | ||
| - For quick fixes and docs: open a PR directly against `main` from a feature branch. | ||
|
|
||
| ## Development Workflow | ||
| 1. Fork the repo and create a branch: `feature/<short-desc>` or `fix/<short-desc>`. | ||
| 2. Keep changes small and focused. | ||
| 3. Add tests when fixing bugs or adding features. | ||
| 4. Run linting and tests locally before opening a PR: | ||
|
|
||
| ```bash | ||
| bun install | ||
| bun run lint --if-present | ||
| bun run test --if-present | ||
| ``` | ||
|
|
||
| 5. Open a PR and include: | ||
| - Summary of changes | ||
| - Testing steps | ||
| - Related issues | ||
|
|
||
| ## Pull Request Checklist | ||
| - [ ] Branch off `main` and keep PR small | ||
| - [ ] Updated/added tests where applicable | ||
| - [ ] Linting passes locally | ||
| - [ ] Descriptive PR title and body | ||
| - [ ] Linked to an issue when appropriate | ||
|
|
||
| ## Commit Messages | ||
| Use short, present-tense messages. Prefer conventional commits (e.g., `feat:`, `fix:`, `chore:`). | ||
|
|
||
| ## Review & Merging | ||
| - At least one approving review required for changes to `main`. | ||
| - Maintainers may squash or rebase when merging. | ||
|
|
||
| ## Local Environment & Secrets | ||
| Follow `.env.example` instructions in `README.md`. Do not commit credentials or tokens. | ||
|
|
||
| ## Reporting Security Issues | ||
| If you find a security vulnerability, please report it privately via GitHub Security Advisories or by contacting the maintainer directly. Please do not open a public issue. | ||
|
|
||
| --- | ||
| Thanks again — we look forward to your contribution! | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,72 @@ | ||||||||||||||||||||||||||||||||||||
| # Documentation — CodeTurtle | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| This document consolidates the project's key documentation into a single reference. | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Quick Links | ||||||||||||||||||||||||||||||||||||
| - Getting started: see the main `README.md` | ||||||||||||||||||||||||||||||||||||
| - Contributing: `CONTRIBUTING.md` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Architecture | ||||||||||||||||||||||||||||||||||||
| CodeTurtle is a full-stack Next.js app (App Router) with authentication, webhook ingestion, and a Prisma-backed database. Major components: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - Client: Next.js (React) with App Router and server components | ||||||||||||||||||||||||||||||||||||
| - Authentication & API: Better Auth for GitHub OAuth + API routes | ||||||||||||||||||||||||||||||||||||
| - Integrations: GitHub (OAuth, webhooks), Vercel (deployment) | ||||||||||||||||||||||||||||||||||||
| - Persistence: Prisma → PostgreSQL | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Notes: | ||||||||||||||||||||||||||||||||||||
| - Webhook ingestion endpoint: `POST /api/webhooks/github` (signature verification enforced) | ||||||||||||||||||||||||||||||||||||
| - Keep `NEXT_PUBLIC_APP_URL` configured and normalized (no trailing slash) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Tech Stack | ||||||||||||||||||||||||||||||||||||
| - Framework: Next.js (App Router) | ||||||||||||||||||||||||||||||||||||
| - Runtime: Bun (dev/CI); Node-compatible | ||||||||||||||||||||||||||||||||||||
| - Auth: Better Auth (GitHub OAuth) | ||||||||||||||||||||||||||||||||||||
| - DB: PostgreSQL with Prisma | ||||||||||||||||||||||||||||||||||||
| - Styles: Tailwind CSS + Shadcn UI | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## GitHub Integration | ||||||||||||||||||||||||||||||||||||
| - OAuth scopes: `repo`, `admin:repo_hook` (as needed) | ||||||||||||||||||||||||||||||||||||
| - Webhooks: supported events — `ping`, `pull_request` (extendable) | ||||||||||||||||||||||||||||||||||||
| - Secrets: webhook secrets are stored per repository and used to validate signatures | ||||||||||||||||||||||||||||||||||||
| - Local testing: use `ngrok` and set `NEXT_PUBLIC_APP_URL` to your tunnel URL | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Project Structure | ||||||||||||||||||||||||||||||||||||
| ```text | ||||||||||||||||||||||||||||||||||||
| src/ | ||||||||||||||||||||||||||||||||||||
| ├── app/ # Next.js App Router | ||||||||||||||||||||||||||||||||||||
| ├── api/ # API routes (auth, webhooks) | ||||||||||||||||||||||||||||||||||||
| ├── lib/ # Auth, prisma client, utilities | ||||||||||||||||||||||||||||||||||||
| ├── components/ # Shared UI components | ||||||||||||||||||||||||||||||||||||
| ├── prisma/ # Prisma schema and migrations | ||||||||||||||||||||||||||||||||||||
| └── styles/ # Global styles | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Project structure appears inconsistent with Next.js App Router conventions. The structure shows Suggested fix src/
├── app/ # Next.js App Router
-├── api/ # API routes (auth, webhooks)
+│ └── api/ # API routes (auth, webhooks)
├── lib/ # Auth, prisma client, utilities
├── components/ # Shared UI components
-├── prisma/ # Prisma schema and migrations
└── styles/ # Global styles
+prisma/ # Prisma schema and migrations (at root)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Development | ||||||||||||||||||||||||||||||||||||
| - Install: `bun install` | ||||||||||||||||||||||||||||||||||||
| - Generate Prisma client: `npx prisma generate` | ||||||||||||||||||||||||||||||||||||
| - Apply migrations: `npx prisma migrate dev` | ||||||||||||||||||||||||||||||||||||
| - Dev server: `bun dev` | ||||||||||||||||||||||||||||||||||||
| - Tests: `bun run test --if-present` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## CI / Deployment | ||||||||||||||||||||||||||||||||||||
| - Checks workflow: `.github/workflows/checks.yml` (lint, test, build) | ||||||||||||||||||||||||||||||||||||
| - Deploy workflow: `.github/workflows/deploy.yml` (push to `main`, requires `VERCEL_TOKEN`) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Troubleshooting | ||||||||||||||||||||||||||||||||||||
| - Redirects/308: ensure webhook URL is exactly `NEXT_PUBLIC_APP_URL` + `/api/webhooks/github` (no double slashes) | ||||||||||||||||||||||||||||||||||||
| - Signature failures: ensure you compute HMAC over the raw payload and compare with `X-Hub-Signature-256` | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Ansh-dhanani/codeturtle
Length of output: 1448
Add missing referenced files or update references.
The CONTRIBUTING.md references two files that do not exist in the repository:
CODE_OF_CONDUCT.md(referenced in "Read and followCODE_OF_CONDUCT.md").env.example(referenced in "Follow.env.exampleinstructions inREADME.md")Either create these files or update the documentation to remove the references to avoid confusing contributors.
🤖 Prompt for AI Agents