adeshboudh16 Claude Sonnet 4.6 commited on
Commit
ecda45f
Β·
1 Parent(s): 8afd257

chore: add install, schema, clean-db make commands

Browse files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (2) hide show
  1. Makefile +20 -1
  2. README.md +11 -17
Makefile CHANGED
@@ -1,4 +1,10 @@
1
- .PHONY: dev frontend test build docker-run
 
 
 
 
 
 
2
 
3
  dev:
4
  uv run uvicorn backend.main:app --reload --port 7860
@@ -6,6 +12,17 @@ dev:
6
  frontend:
7
  cd frontend && npm run dev
8
 
 
 
 
 
 
 
 
 
 
 
 
9
  test:
10
  uv run pytest tests/ -v
11
 
@@ -13,5 +30,7 @@ build:
13
  cd frontend && npm run build
14
  docker build -t ai-interviewmentor .
15
 
 
 
16
  docker-run:
17
  docker run --name ai-interviewmentor --env-file .env -p 7860:7860 --rm ai-interviewmentor
 
1
+ .PHONY: dev frontend test build docker-run schema clean-db install
2
+
3
+ # ── Local dev ────────────────────────────────────────────────────────────────
4
+
5
+ install:
6
+ uv sync
7
+ cd frontend && npm install
8
 
9
  dev:
10
  uv run uvicorn backend.main:app --reload --port 7860
 
12
  frontend:
13
  cd frontend && npm run dev
14
 
15
+ # ── Database ─────────────────────────────────────────────────────────────────
16
+
17
+ schema:
18
+ uv run python backend/db/apply_schema.py
19
+
20
+ clean-db:
21
+ uv run python backend/db/clean_db.py
22
+ uv run python backend/db/apply_schema.py
23
+
24
+ # ── Tests & build ────────────────────────────────────────────────────────────
25
+
26
  test:
27
  uv run pytest tests/ -v
28
 
 
30
  cd frontend && npm run build
31
  docker build -t ai-interviewmentor .
32
 
33
+ # ── Docker ───────────────────────────────────────────────────────────────────
34
+
35
  docker-run:
36
  docker run --name ai-interviewmentor --env-file .env -p 7860:7860 --rm ai-interviewmentor
README.md CHANGED
@@ -56,27 +56,21 @@ Set these as secrets in HF Spaces β†’ Settings β†’ Variables and secrets:
56
  ## Local Development
57
 
58
  ```bash
59
- # Install backend deps
60
- uv sync
61
-
62
- # Apply DB schema (first time only)
63
- uv run python backend/db/apply_schema.py
64
-
65
- # Start backend (port 7860)
66
- uv run uvicorn backend.main:app --host 0.0.0.0 --port 7860 --reload
67
-
68
- # Start frontend dev server (port 5173, proxies /api and /interview to :7860)
69
- cd frontend && npm install && npm run dev
70
  ```
71
 
72
  ## Docker
73
 
74
  ```bash
75
- # Build and run locally
76
- make build
77
- make docker-run
78
 
79
- # Reset all data (wipes DB + LangGraph checkpoints)
80
- uv run python backend/db/clean_db.py
81
- uv run python backend/db/apply_schema.py
82
  ```
 
 
 
56
  ## Local Development
57
 
58
  ```bash
59
+ make install # install all backend + frontend deps
60
+ make schema # apply DB schema (run once on fresh DB)
61
+ make dev # start backend on :7860 with auto-reload
62
+ make frontend # start frontend dev server on :5173
63
+ make test # run pytest suite
 
 
 
 
 
 
64
  ```
65
 
66
  ## Docker
67
 
68
  ```bash
69
+ make build # build frontend + Docker image
70
+ make docker-run # run container with .env on localhost:7860
 
71
 
72
+ # Reset DB and re-apply schema (wipes all data + checkpoints)
73
+ make clean-db
 
74
  ```
75
+
76
+ > **CSV upload** β€” use the Instructor portal β†’ Upload page. Format: `question_text,difficulty` (difficulty: easy / medium / hard). A sample file is at `docs/question_bank/linear_regression.csv`.