# Project export: OwnYourCode

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: OpenAI Build Week
- Tagline: OwnYourCode helps students and junior developers understand their projects, create new ones, learn how the code works, and improve the skills they lack.
- Devpost: https://devpost.com/software/ownyourcode
- GitHub: https://github.com/katanna13/ownyourcode
- Video: https://www.youtube.com/embed/IUl9kRbM8_M?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — mihaiu (18 commits)

## Devpost submission (written by the team)

### Inspiration

A lot of students and junior developers can build surprisingly complex projects with AI, but there is a problem: the application may work even when the person who created it does not fully understand the code. I experienced this myself while building with AI. It is easy to ask a model to generate a feature, fix an error, or connect a frontend to a backend. It is much harder to explain why the architecture works, where validation happens, what the security limitations are, or how to modify the project without depending completely on AI. That problem inspired OwnYourCode. The main idea is simple: AI may help you build the code, but OwnYourCode helps you understand, verify, and defend it. What OwnYourCode does OwnYourCode turns a software project into a personalized learning experience. A learner can provide a public GitHub repository, and the application performs a bounded repository inspection. It detects confirmed technologies, languages, manifests, and architecture evidence without cloning the repository or pretending to understand files it has not inspected. From that evidence, OwnYourCode creates a guided learning flow: Inspect the repository Learn how its architecture works Complete an evidence-based assessment Solve a verified coding lab Repair a security configuration challenge Defend architecture decisions Review a transparent learning summary The AI is used for explanation and evaluation where human language matters. Deterministic validation remains authoritative for code structure, fixed checks, evidence selection, and completion gates. The public demo is session-only and can be tried without creating an account. Signed-in users can also save projects, return after a refresh or logout, archive projects, and resume a persisted Existing Repository learning workspace. New Idea projects can already be stored, with a larger Build From Scratch learning workflow planned next. How I built it OwnYourCode is a full-stack application built with: React, TypeScript, and Vite for the frontend FastAPI and Python for the API PostgreSQL and SQLAlchemy for persistent data Alembic for database migrations Clerk for authentication Docker Compose for the local environment GitHub APIs for bounded public repository inspection OpenAI models for evidence-grounded lesson generation and explanation evaluation The application follows a modular-monolith architecture. The frontend sends validated requests to FastAPI. The backend validates them with Pydantic, verifies the authenticated user, scopes saved projects by owner, and performs the repository or learning operation. Repository evidence is collected deterministically before it is sent to the model. Model output is structured and validated again before it is returned or persisted. For the coding labs, learner code is parsed using Python's AST. It is never executed inside the API process. The security challenge also uses a server-owned teaching fixture and does not claim to scan the actual repository. Persistent learning workspaces use immutable inspection snapshots, versioned learning definitions, saved attempts, context fingerprints, idempotency protection, and server-calculated progression. How I used Codex I used Codex as an implementation partner throughout the project, including GPT-5.6 for part of the build. My role was to define the product, architecture, safety boundaries, user experience, and acceptance criteria. I reviewed implementation plans, tested the application in the browser, found integration and UX bugs, and repeatedly refined the generated code. Some examples include: separating AI explanation from deterministic verification; preventing arbitrary learner-code execution; designing ownership checks for persisted projects; identifying scrolling, CORS, form-control, and stage-progression bugs; restructuring the interface from one long page into a staged learning workspace; preserving the public demo while adding authenticated persistent projects. Codex accelerated implementation, but the product direction, trade-offs, testing, and final decisions remained my responsibility. Challenges One major challenge was preventing the application from making unsupported claims about a repository. The solution was to create a bounded evidence catalog and require generated lessons and evaluations to reference only confirmed evidence IDs. Another challenge was designing practical verification without running arbitrary code. I solved this with constrained server-owned fixtures and AST-only validation. Authentication and persistence introduced additional complexity. Every protected project query has to be scoped to the authenticated owner, migrations must remain reproducible, and learning progress must survive refreshes without trusting completion flags sent by the browser. The frontend also required several iterations. Early versions were one long scrolling page. I redesigned the flow into focused stages with explicit Continue and Back actions, fixed unwanted scrolling, improved accessibility, and created a more polished liquid-glass visual system. What I learned This project taught me that building with AI is not only about writing prompts. I learned how to think about: frontend and backend boundaries; API validation; authentication and authorization; database migrations and ownership; model-output validation; idempotent requests; deterministic versus model-based evaluation; safe code analysis; accessibility and real browser testing. Most importantly, I learned that working software is not the same as understood software. That is the exact problem OwnYourCode is trying to solve.

### What's next

The next step is to expand saved projects into deeper multi-module learning paths. Existing Repository projects will receive several practical modules based on confirmed repository evidence. New Idea projects will become guided Build From Scratch experiences with architecture decisions, milestones, practical tasks, verification, and a final defense. The long-term goal is not to stop developers from using AI. It is to help them remain the engineers responsible for what AI helps them create.

## README (from the GitHub repository)

# OwnYourCode

> **AI helped you build it. OwnYourCode helps you understand, secure, and defend it.**

OwnYourCode is an adaptive software-engineering learning platform for beginner and junior developers who use AI coding tools but do not yet fully understand the code they build.

The platform transforms an existing repository—or a new project idea—into a personalized learning path with lessons, code-tracing exercises, quizzes, verified coding labs, security challenges, and architecture oral defenses.

## The Problem

AI coding tools allow developers to build applications faster than ever, but many users ship code they cannot confidently explain, debug, secure, or scale.

This can lead to:

- hardcoded secrets and exposed `.env` files;
- insecure configurations;
- misunderstood code execution;
- deployment failures;
- vulnerable dependencies;
- architectural decisions the developer cannot defend;
- complete dependence on AI for every future change.

OwnYourCode turns AI-assisted development into an active learning process.

## How It Works

```text
Learn
  ↓
Predict
  ↓
Explain
  ↓
Apply
  ↓
Execute
  ↓
Verify
  ↓
Defend
  ↓
Adapt the next lesson
```

The model can teach and interpret, but only deterministic tests, code execution, and security scans can prove that a solution works.

## Planned MVP

### Understand My Repository

- Analyze a public GitHub repository
- Detect the stack, architecture, and important concepts
- Generate repository-grounded lessons
- Create code prediction and explain-back challenges
- Detect selected security and configuration risks
- Turn findings into guided learning exercises
- Verify coding labs with real execution and tests
- Track misconceptions and progress

### Build From Scratch

- Start from a project idea
- Define users, requirements, and core flows
- Learn architecture and technology choices
- Build the project through guided milestones
- Complete testing, security, and scaling challenges
- Defend the final architecture

### Ask & Learn

- Ask general software-engineering questions
- Apply concepts directly to the learner's project
- Receive adaptive explanations based on current progress

## What Makes It Different

A generic AI tutor answers questions.

OwnYourCode requires evidence that the learner understands:

- code-output prediction;
- line-by-line explanations;
- counterfactual questions;
- verified coding labs;
- security remediation;
- architecture trade-offs;
- scaling and reliability defenses.

## Ownership Score

Progress will be based on measurable evidence, including:

- correct code predictions;
- explanation quality;
- completed labs;
- tests passed;
- number of hints required;
- security findings understood and fixed;
- architecture decisions successfully defended.

The score will not be invented by the language model.

## Architecture

OwnYourCode uses a modular monolith with a separate isolated execution worker for running supported code, tests, and security checks.

See the full architecture document:

[docs/architecture.md](docs/architecture.md)

## Planned Technology Stack

### Frontend

- React
- TypeScript
- Monaco Editor

### Backend

- FastAPI
- PostgreSQL
- Pydantic
- SQLAlchemy

### AI

- OpenAI models for personalized learning, evaluation, and adaptive questioning
- Provider-agnostic LLM gateway
- Structured model outputs

### Verification

- Isolated execution worker
- Deterministic tests
- Security and configuration checks
- Reproducible demo repositories

## Project Status

Phase 11A adds a separate authenticated `/app` foundation with Clerk-backed
identity, owner-scoped projects, PostgreSQL migrations, and persisted Existing
Repository or New Idea project sources. It deliberately does not yet persist
inspection results, lessons, activities, attempts, learning paths, or progress.
The authenticated project detail truthfully says that learning-workspace
persistence is coming next.

The public `/projects/new` demo remains available without an account. Its
inspection, lesson, assessment, lab, security challenge, oral defense, and
Preview Ownership Score remain explicitly browser-session-only and are not
saved to authenticated projects.

## Initial Repository Structure

```text
ownyourcode/
├── docs/
│   └── architecture.md
├── README.md
├── .gitignore
└── .env.example
```

## Local Development

Prerequisite: Docker Desktop with Docker Compose v2.

In PowerShell, create your local development configuration and start the
services:

```powershell
Copy-Item .env.example .env
docker compose up --build -d
docker compose exec api alembic upgrade head
```

Verify the API and run the tests:

```powershell
Invoke-RestMethod http://localhost:8000/healthz
docker compose exec web npm run test -- --run
```

The frontend is available at `http://localhost:5173`; the FastAPI docs are at
`http://localhost:8000/docs`. Stop the stack with `docker compose down`.

The PostgreSQL integration suite requires a separately created, explicitly
named test database. Do not point `TEST_DATABASE_URL` at the application
database:

```powershell
docker compose exec db createdb -U ownyourcode ownyourcode_test
docker compose exec -e TEST_DATABASE_URL='postgresql+psycopg://ownyourcode:ownyourcode@db:5432/ownyourcode_test' api pytest
```

## Environment Variables

Copy `.env.example` to `.env` and retain local values only. The API uses
`CORS_ORIGINS` for the browser allow-list and `VITE_API_BASE_URL` for the
browser's public API address. `GITHUB_TOKEN` is optional and backend-only: it
can improve GitHub API limits, but is never sent to the browser or returned by
the API. `OPENAI_API_KEY` and `OPENAI_MODEL` are backend-only and required only
for lesson generation; never expose them through Vite variables or commit them.

## Development Principles

- The learner must do the thinking.
- The model may teach, guide, and evaluate explanations.
- Tests and execution provide the final proof.
- Untrusted code must never run inside the main API process.
- Repository secrets must not be sent to the model.
- Roadmap features must not be presented as implemented.

## Built During OpenAI Build Week

OwnYourCode is being designed and developed during OpenAI Build Week.

Architecture, product scope, learning methodology, security boundaries, and implementation decisions are documented throughout the repository.

## Author

Mihai Catana


## Detected evidence (automated analysis)

Indexed codebase: 162 recognized source files, 1080 KB.
- CSS (language) — detected in the code
- FastAPI (technology) — detected in the code
- HTML (language) — detected in the code
- OpenAI (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- TypeScript (language) — detected in the code
- PostgreSQL (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (120 of 173)

```
.dockerignore
.env.example
.gitignore
apps/api/alembic.ini
apps/api/alembic/env.py
apps/api/alembic/script.py.mako
apps/api/alembic/versions/20260716_01_initial_users_projects_sources.py
apps/api/alembic/versions/20260716_02_persisted_learning_workspaces.py
apps/api/alembic/versions/20260721_03_learning_paths.py
apps/api/Dockerfile
apps/api/pyproject.toml
apps/api/src/ownyourcode/__init__.py
apps/api/src/ownyourcode/api/__init__.py
apps/api/src/ownyourcode/api/router.py
apps/api/src/ownyourcode/api/routes/__init__.py
apps/api/src/ownyourcode/api/routes/health.py
apps/api/src/ownyourcode/core/__init__.py
apps/api/src/ownyourcode/core/config.py
apps/api/src/ownyourcode/core/github_url.py
apps/api/src/ownyourcode/db/__init__.py
apps/api/src/ownyourcode/db/base.py
apps/api/src/ownyourcode/db/session.py
apps/api/src/ownyourcode/main.py
apps/api/src/ownyourcode/modules/__init__.py
apps/api/src/ownyourcode/modules/assessments/__init__.py
apps/api/src/ownyourcode/modules/assessments/definition.py
apps/api/src/ownyourcode/modules/assessments/openai_client.py
apps/api/src/ownyourcode/modules/assessments/router.py
apps/api/src/ownyourcode/modules/assessments/schemas.py
apps/api/src/ownyourcode/modules/assessments/service.py
apps/api/src/ownyourcode/modules/authentication/__init__.py
apps/api/src/ownyourcode/modules/authentication/dependencies.py
apps/api/src/ownyourcode/modules/authentication/models.py
apps/api/src/ownyourcode/modules/authentication/router.py
apps/api/src/ownyourcode/modules/authentication/schemas.py
apps/api/src/ownyourcode/modules/authentication/service.py
apps/api/src/ownyourcode/modules/authentication/verifier.py
apps/api/src/ownyourcode/modules/labs/__init__.py
apps/api/src/ownyourcode/modules/labs/router.py
apps/api/src/ownyourcode/modules/labs/schemas.py
apps/api/src/ownyourcode/modules/labs/service.py
apps/api/src/ownyourcode/modules/labs/verifier.py
apps/api/src/ownyourcode/modules/learning_paths/__init__.py
apps/api/src/ownyourcode/modules/learning_paths/continuous_openai.py
apps/api/src/ownyourcode/modules/learning_paths/continuous_schemas.py
apps/api/src/ownyourcode/modules/learning_paths/continuous_service.py
apps/api/src/ownyourcode/modules/learning_paths/models.py
apps/api/src/ownyourcode/modules/learning_paths/planner.py
apps/api/src/ownyourcode/modules/learning_paths/router.py
apps/api/src/ownyourcode/modules/learning_paths/schemas.py
apps/api/src/ownyourcode/modules/learning_paths/service.py
apps/api/src/ownyourcode/modules/learning_workspaces/__init__.py
apps/api/src/ownyourcode/modules/learning_workspaces/builders.py
apps/api/src/ownyourcode/modules/learning_workspaces/models.py
apps/api/src/ownyourcode/modules/learning_workspaces/repository.py
apps/api/src/ownyourcode/modules/learning_workspaces/router.py
apps/api/src/ownyourcode/modules/learning_workspaces/schemas.py
apps/api/src/ownyourcode/modules/learning_workspaces/service.py
apps/api/src/ownyourcode/modules/lessons/__init__.py
apps/api/src/ownyourcode/modules/lessons/evidence.py
apps/api/src/ownyourcode/modules/lessons/openai_client.py
apps/api/src/ownyourcode/modules/lessons/router.py
apps/api/src/ownyourcode/modules/lessons/schemas.py
apps/api/src/ownyourcode/modules/lessons/service.py
apps/api/src/ownyourcode/modules/oral_defenses/__init__.py
apps/api/src/ownyourcode/modules/oral_defenses/definition.py
apps/api/src/ownyourcode/modules/oral_defenses/openai_client.py
apps/api/src/ownyourcode/modules/oral_defenses/router.py
apps/api/src/ownyourcode/modules/oral_defenses/schemas.py
apps/api/src/ownyourcode/modules/oral_defenses/service.py
apps/api/src/ownyourcode/modules/projects/__init__.py
apps/api/src/ownyourcode/modules/projects/models.py
apps/api/src/ownyourcode/modules/projects/repository.py
apps/api/src/ownyourcode/modules/projects/router.py
apps/api/src/ownyourcode/modules/projects/schemas.py
apps/api/src/ownyourcode/modules/projects/service.py
apps/api/src/ownyourcode/modules/repositories/__init__.py
apps/api/src/ownyourcode/modules/repositories/github_client.py
apps/api/src/ownyourcode/modules/repositories/inspector.py
apps/api/src/ownyourcode/modules/repositories/router.py
apps/api/src/ownyourcode/modules/repositories/schemas.py
apps/api/src/ownyourcode/modules/repositories/service.py
apps/api/src/ownyourcode/modules/security_challenges/__init__.py
apps/api/src/ownyourcode/modules/security_challenges/router.py
apps/api/src/ownyourcode/modules/security_challenges/schemas.py
apps/api/src/ownyourcode/modules/security_challenges/service.py
apps/api/src/ownyourcode/modules/security_challenges/verifier.py
apps/api/tests/conftest.py
apps/api/tests/test_architecture_oral_defense.py
apps/api/tests/test_architecture_orientation_assessment.py
apps/api/tests/test_authentication.py
apps/api/tests/test_continuous_learning_openai.py
apps/api/tests/test_fastapi_cors_security_challenge.py
apps/api/tests/test_fastapi_health_check_lab.py
apps/api/tests/test_healthz.py
apps/api/tests/test_learning_paths.py
apps/api/tests/test_lessons_generate.py
apps/api/tests/test_migrations.py
apps/api/tests/test_persisted_learning_workspaces.py
apps/api/tests/test_persistent_projects.py
apps/api/tests/test_projects_preview.py
apps/api/tests/test_repositories_inspect.py
apps/web/Dockerfile
apps/web/index.html
apps/web/package.json
apps/web/src/App.test.tsx
apps/web/src/App.tsx
apps/web/src/assets/fonts/OFL.txt
apps/web/src/auth/authenticatedFetch.ts
apps/web/src/auth/ClerkProviderBoundary.tsx
apps/web/src/auth/returnPath.ts
apps/web/src/components/AppShell.tsx
apps/web/src/components/AssessmentPanel.test.tsx
apps/web/src/components/AssessmentPanel.tsx
apps/web/src/components/CheckResultList.tsx
apps/web/src/components/CodeFixtureEditor.test.tsx
apps/web/src/components/CodeFixtureEditor.tsx
apps/web/src/components/ContinuousLearningPanel.test.tsx
apps/web/src/components/ContinuousLearningPanel.tsx
apps/web/src/components/EvidenceChip.tsx
[53 more files omitted for size]
```

### Dependencies

- apps/api/pyproject.toml: alembic@>=1.14,<2.0, clerk-backend-api@==6.0.1, fastapi@>=0.115,<1.0, httpx@>=0.27,<1.0, openai@>=1.109,<2.0, psycopg[binary]@>=3.2,<4.0, pydantic-settings@>=2.0,<3.0, pytest@>=8.0,<10.0, sqlalchemy@>=2.0,<3.0, uvicorn[standard]@>=0.30,<1.0
- apps/web/package.json: @clerk/react@^6.12.4, @testing-library/react@^16.0.0, @types/react@^19.0.0, @types/react-dom@^19.0.0, @vitejs/plugin-react@^4.0.0, jsdom@^25.0.0, react@^19.0.0, react-dom@^19.0.0, react-router-dom@^7.0.0, typescript@^5.0.0, vite@^6.0.0, vitest@^3.0.0

### Recent commits (newest first)

- feat: complete Phase 12 learning experience
- feat: add persistent learning paths and continuous learning
- fix: recover stale persisted learning paths
- feat: add persisted learning path workspace
- feat: add deterministic persisted learning path
- feat: add persisted learning path schema
- feat: persist authenticated repository learning workspaces
- feat: redesign frontend as staged learning workspace
- feat: add architecture oral defense and preview ownership score
- chore: ignore local test temp files
- feat: add deterministic FastAPI CORS security challenge
- feat: add safe verified FastAPI lab
- feat: add evidence-grounded repository assessment
- feat: generate evidence-grounded repository lessons
- feat: add deterministic GitHub repository inspection
- feat: add project preview validation flow
- feat: scaffold Phase 1 application foundation
- docs: define OwnYourCode architecture and MVP

## Key source files (fetched from GitHub, selected and truncated for size)

### docs/adr/ADR-002-separate-execution-worker.md

```markdown
# ADR-002: Separate Execution Worker

## Status

Accepted

## Context

OwnYourCode will eventually run learner code, tests, and security checks.
Those workloads may contain untrusted code and must not have access to the API
process, application secrets, or unrestricted network and filesystem access.

## Decision

When execution or scanning is implemented, it will run in a separately
isolated worker with strict resource and access limits. It will not run inside
the FastAPI process.

## Consequences

Phase 1 deliberately creates no worker service and exposes no execution or
scan endpoint. Future work must provide isolation, ephemeral workspaces,
network restrictions, and deterministic evidence before execution is enabled.

```

### docs/adr/ADR-001-modular-monolith.md

```markdown
# ADR-001: Modular Monolith

## Status

Accepted

## Context

OwnYourCode needs a small, reliable MVP while preserving clear boundaries for
future product domains such as projects, repository analysis, learning, and
progress.

## Decision

Use one FastAPI backend codebase with explicit domain modules. The frontend,
API, and PostgreSQL database run as separate local Compose services, but the
backend does not split ordinary product domains into independently deployed
services.

## Consequences

The MVP has one backend deployment and one source of truth, which reduces
operational overhead and makes tests and local development straightforward.
Module boundaries must remain deliberate so that a future high-cost or
high-risk responsibility can be extracted without spreading its logic across
the application.

```

### docker-compose.yml

```yaml
services:
  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
      interval: 5s
      timeout: 5s
      retries: 5
    volumes:
      - postgres_data:/var/lib/postgresql/data

  api:
    build:
      context: .
      dockerfile: apps/api/Dockerfile
    env_file:
      - .env
    environment:
      DATABASE_URL: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "8000:8000"
    volumes:
      - ./apps/api:/app

  web:
    build:
      context: .
      dockerfile: apps/web/Dockerfile
    depends_on:
      - api
    environment:
      VITE_API_BASE_URL: ${VITE_API_BASE_URL}
      VITE_CLERK_PUBLISHABLE_KEY: ${VITE_CLERK_PUBLISHABLE_KEY:-}
    ports:
      - "5173:5173"
    volumes:
      - ./apps/web:/app
      - web_node_modules:/app/node_modules

volumes:
  postgres_data:
  web_node_modules:

```

### apps/web/Dockerfile

```
FROM node:24-alpine

WORKDIR /app

COPY apps/web/package.json apps/web/package-lock.json ./
RUN npm ci

COPY apps/web .

CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

```

### apps/api/Dockerfile

```
FROM python:3.12-slim

WORKDIR /app

COPY apps/api/pyproject.toml ./pyproject.toml
COPY apps/api/alembic.ini ./alembic.ini
COPY apps/api/alembic ./alembic
COPY apps/api/src ./src
COPY apps/api/tests ./tests

RUN pip install --no-cache-dir --upgrade pip \
    && pip install --no-cache-dir -e ".[dev]"

CMD ["uvicorn", "ownyourcode.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-exclude", ".pytest_cache"]

```

### apps/web/package.json

```
{
  "name": "@ownyourcode/web",
  "version": "0.1.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc --noEmit && vite build",
    "test": "vitest"
  },
  "dependencies": {
    "@clerk/react": "^6.12.4",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "react-router-dom": "^7.0.0"
  },
  "devDependencies": {
    "@testing-library/react": "^16.0.0",
    "@types/react": "^19.0.0",
    "@types/react-dom": "^19.0.0",
    "@vitejs/plugin-react": "^4.0.0",
    "jsdom": "^25.0.0",
    "typescript": "^5.0.0",
    "vite": "^6.0.0",
    "vitest": "^3.0.0"
  }
}

```

### apps/api/pyproject.toml

```
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"

[project]
name = "ownyourcode-api"
version = "0.1.0"
description = "OwnYourCode API"
requires-python = ">=3.12"
dependencies = [
    "alembic>=1.14,<2.0",
    "clerk-backend-api==6.0.1",
    "fastapi>=0.115,<1.0",
    "httpx>=0.27,<1.0",
    "openai>=1.109,<2.0",
    "pydantic-settings>=2.0,<3.0",
    "psycopg[binary]>=3.2,<4.0",
    "sqlalchemy>=2.0,<3.0",
    "uvicorn[standard]>=0.30,<1.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=8.0,<10.0",
]

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.setuptools.packages.find]
where = ["src"]

```

### apps/web/src/main.tsx

```typescript
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";

import { App } from "./App";
import { ClerkProviderBoundary } from "./auth/ClerkProviderBoundary";
import "./styles.css";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <ClerkProviderBoundary>
      <BrowserRouter>
        <App />
      </BrowserRouter>
    </ClerkProviderBoundary>
  </StrictMode>
);

```

### apps/web/src/App.tsx

```typescript
import { Navigate, Route, Routes } from "react-router-dom";

import { AppShell } from "./components/AppShell";
import { RequireSession } from "./components/RequireSession";
import { LandingPage } from "./pages/LandingPage";
import { AppProjectWorkspacePage } from "./pages/AppProjectWorkspacePage";
import { CreateProjectPage } from "./pages/CreateProjectPage";
import { NewProjectPage } from "./pages/NewProjectPage";
import { ProjectsDashboardPage } from "./pages/ProjectsDashboardPage";
import { ProjectWorkspacePage } from "./pages/ProjectWorkspacePage";
import { SignInPage } from "./pages/SignInPage";

export function App() {
  return (
    <Routes>
      <Route path="/" element={<LandingPage />} />
      <Route path="/projects/new" element={<NewProjectPage />} />
      <Route path="/projects/:projectId" element={<ProjectWorkspacePage />} />
      <Route path="/sign-in/*" element={<SignInPage />} />
      <Route path="/app" element={<RequireSession><AppShell /></RequireSession>}>
        <Route index element={<Navigate to="projects" replace />} />
        <Route path="projects" element={<ProjectsDashboardPage />} />
        <Route path="projects/new" element={<CreateProjectPage />} />
        <Route path="projects/:projectId" element={<AppProjectWorkspacePage />} />
      </Route>
    </Routes>
  );
}

```

### apps/api/src/ownyourcode/main.py

```python
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from ownyourcode.api.router import router
from ownyourcode.core.config import get_settings

settings = get_settings()

app = FastAPI(
    title="OwnYourCode API",
    version="0.1.0",
    debug=settings.app_env == "development",
)
app.add_middleware(
    CORSMiddleware,
    allow_origins=settings.cors_origins,
    allow_credentials=False,
    allow_methods=["GET", "POST", "PATCH", "DELETE"],
    allow_headers=["Authorization", "Content-Type", "Idempotency-Key"],
)
app.include_router(router)

```

[155 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]