Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
537 commits
Select commit Hold shift + click to select a range
7c2b308
Implement service layer architecture and API refactoring
austeane Mar 9, 2025
ffa80ff
Fix practice plan creation with cart drills and add tests
austeane Mar 9, 2025
750a75f
updating homepage image
austeane Mar 11, 2025
91c30f4
trying fix
austeane Apr 13, 2025
d35349e
fixing error
austeane Apr 13, 2025
02af145
updating lots
austeane Apr 13, 2025
da43369
updating lots
austeane Apr 13, 2025
6225abb
package
austeane Apr 13, 2025
e529b4a
updating server.js
austeane Apr 13, 2025
69f8dd4
updating build
austeane Apr 13, 2025
0ba07fa
using node pg migrate
austeane Apr 13, 2025
9237490
major refactor for speed, and adding cypress
austeane Apr 13, 2025
bff4cd6
Repository cleanup: remove unused files, move har_cleaner.py to scrip…
austeane Apr 13, 2025
091a4e2
finishing code review
austeane Apr 13, 2025
e93e07e
updating readme and doc
austeane Apr 13, 2025
cf9ff93
updating user service
austeane Apr 15, 2025
0df5492
updating to better auth
austeane Apr 15, 2025
d88e57f
updating session
austeane Apr 18, 2025
74dd105
updating
austeane Apr 18, 2025
9707380
better auth
austeane Apr 20, 2025
f348fc8
updating
austeane Apr 20, 2025
2b7b751
updating auth
austeane Apr 20, 2025
ac08a5b
allowing deletes
austeane Apr 20, 2025
8bc5df3
tickets 6 and 7
austeane Apr 20, 2025
c392638
tickets 6 7 13
austeane Apr 20, 2025
76889ef
updating filter logic
austeane Apr 20, 2025
111d23f
ticket 11
austeane Apr 20, 2025
1e2dc45
updating services
austeane Apr 20, 2025
0166fb7
fixing build errors
austeane Apr 21, 2025
fe646a3
updating display
austeane Apr 21, 2025
0a98329
ticket 8
austeane Apr 21, 2025
b76229c
fixing stores
austeane Apr 22, 2025
83c32db
update create drill
austeane Apr 23, 2025
ed8e30d
refactor drill duration handling to use suggested_length_min and sugg…
austeane May 4, 2025
0d2cb1d
updating practice display
austeane May 5, 2025
743b97b
fixing build
austeane May 5, 2025
e791905
Add new components for practice plan management, including UI element…
austeane May 5, 2025
9843ad3
continuing to work on ai generation
austeane May 6, 2025
b25348f
updating ai and cors
austeane May 12, 2025
814a561
updating
austeane May 12, 2025
3c959ae
delete changes
austeane May 12, 2025
dec0729
handling base64
austeane May 12, 2025
92c7d76
prefill
austeane May 12, 2025
b221d5e
updating linkage
austeane May 12, 2025
0855a68
update generated plans
austeane May 12, 2025
9d97dec
update ai
austeane May 12, 2025
edab0c5
updating login
austeane May 12, 2025
6f08182
updating whiteboard
austeane May 12, 2025
b5fcfba
get rid of header
austeane May 12, 2025
1af35ac
adding sentry
austeane May 12, 2025
21d0eb7
update edit buttons
austeane May 12, 2025
3918b44
updating profiles
austeane May 16, 2025
f8961e9
linting
austeane May 16, 2025
415eadc
major test updates
austeane May 16, 2025
28b2ada
update scripts
austeane May 16, 2025
e65d663
update scripts
austeane May 16, 2025
8163937
fix variant creation
austeane May 17, 2025
7210bf4
Merge pull request #50 from austeane/codex/find-and-fix-a-bug-in-code…
austeane May 17, 2025
32abd37
chore: fix linting issues
austeane May 17, 2025
59112c3
Ensure newline at EOF for scripts
austeane May 17, 2025
2a1eda0
docs: update workflow guide reference
austeane May 17, 2025
596f4fb
Rename Excalidraw wrapper ticket
austeane May 17, 2025
dc79357
test: verify console error on db failure
austeane May 17, 2025
f22e085
Merge pull request #52 from austeane/codex/update-scripts-with-main-e…
austeane May 17, 2025
f85dfe9
Merge pull request #53 from austeane/codex/remove-to-be-created-from-…
austeane May 17, 2025
cedcbee
fixing bug
austeane May 17, 2025
a596a6b
Merge pull request #54 from austeane/codex/rename-and-update-file-ref…
austeane May 17, 2025
eec22b5
Merge pull request #55 from austeane/codex/enhance-should-handle-data…
austeane May 17, 2025
7498900
Merge branch 'main' into codex/run-pnpm-lint-and-reduce-errors
austeane May 17, 2025
9c563b2
Merge pull request #51 from austeane/codex/run-pnpm-lint-and-reduce-e…
austeane May 17, 2025
db42d03
Refactor button components for consistency and accessibility; update …
austeane May 21, 2025
cf69bb9
refactor: use apiFetch for remaining pages
austeane May 21, 2025
dc0c806
feat(validation): use centralized schemas on forms
austeane May 21, 2025
19c28ee
refactor: decouple modals from sections store
austeane May 21, 2025
4f8d8d1
refactor: extract excalidraw util modules
austeane May 21, 2025
82b6692
chore: remove unused utilities and migration
austeane May 21, 2025
b17675d
updating
austeane May 21, 2025
f965806
Merge pull request #56 from austeane/codex/implement-consistent-api-e…
austeane May 21, 2025
b22fc15
Merge pull request #57 from austeane/codex/centralize-validation-logic
austeane May 21, 2025
8260230
Merge pull request #59 from austeane/codex/refactor-complex-excalidra…
austeane May 21, 2025
ae86c60
updating db
austeane May 21, 2025
634afc7
Merge pull request #58 from austeane/codex/decouple-shared-components…
austeane May 21, 2025
ddfffd7
Merge pull request #63 from austeane/codex/remove-unused-services-and…
austeane May 21, 2025
afbfede
fix(button): forward events
austeane May 21, 2025
bb2eb69
fixing section button
austeane May 21, 2025
d2a1011
Merge pull request #64 from austeane/codex/fix-'+-add-section'-button…
austeane May 21, 2025
7f1564c
adding doc
austeane May 21, 2025
ef04a08
Add ARIA attributes and keyboard support
austeane May 21, 2025
0a14a61
chore: remove unused stores
austeane May 21, 2025
9f2c053
Merge pull request #65 from austeane/codex/conduct-a11y-review
austeane May 21, 2025
2f85bbd
Merge pull request #67 from austeane/m34w25-codex/remove-unused-store…
austeane May 21, 2025
34c51cf
pretty
austeane May 21, 2025
b984680
chore: remove unused Counter example
austeane May 21, 2025
a5f3b76
Merge pull request #68 from austeane/codex/remove-unused-example-comp…
austeane May 21, 2025
2faae7d
Remove admin role tests
austeane May 21, 2025
919b208
Merge pull request #69 from austeane/codex/remove-role-based-admin-ch…
austeane May 21, 2025
8a1a925
updating pnpm
austeane May 21, 2025
6e8154f
updating formations
austeane May 23, 2025
9122117
updating loading bar
austeane May 23, 2025
cb7adb1
updating formations duplicate
austeane May 23, 2025
0b0ee83
updating userid
austeane May 23, 2025
ef3ce0f
updating userid
austeane May 23, 2025
f863a01
updating formations
austeane May 23, 2025
83311b0
updating
austeane May 24, 2025
0895993
update formation
austeane May 24, 2025
6fea558
updating
austeane May 24, 2025
011d275
updating server
austeane May 24, 2025
928d00f
adding tool tip
austeane May 24, 2025
9faa0c0
updating rules
austeane May 24, 2025
33124a7
updating tickets
austeane May 24, 2025
82e315d
update auth
austeane May 25, 2025
3666ea4
updating tooltip
austeane May 26, 2025
4aebeb8
Remove create_drill_script.py and create_practice_plan_script.py; add…
austeane May 28, 2025
455f9e8
update plan
austeane May 28, 2025
8aafa7d
Enhance practice plan functionality with new modal for adding drills,…
austeane May 28, 2025
74b6c2d
Add FormationItem component for handling formation references in prac…
austeane May 28, 2025
a0794c7
Implement timeline change functionality in DrillItem and SectionConta…
austeane May 28, 2025
256037c
updating editing
austeane May 29, 2025
85be732
updating creation
austeane May 31, 2025
f98949a
docs: update ticket 30 cleanup status
austeane Jul 18, 2025
f21a2cb
Merge pull request #79 from austeane/codex/update-ticket-for-30-clean…
austeane Jul 18, 2025
279f702
docs: update search UX ticket
austeane Jul 18, 2025
6b7a12e
docs: update navigation accessibility ticket
austeane Jul 18, 2025
7511edc
docs: update loading states ticket
austeane Jul 18, 2025
00424f1
docs: clarify landing page CTA ticket
austeane Jul 18, 2025
b73bc28
docs: update error handling ticket status
austeane Jul 18, 2025
06473d8
Merge pull request #80 from austeane/codex/update-ux-improvements-sea…
austeane Jul 18, 2025
5162e21
Merge pull request #81 from austeane/codex/update-ticket-for-ux-impro…
austeane Jul 18, 2025
8492c2d
Merge pull request #82 from austeane/codex/update-ticket-for-loading-…
austeane Jul 18, 2025
c183a84
Merge pull request #83 from austeane/codex/update-ux-improvements-lan…
austeane Jul 18, 2025
de4f518
Merge pull request #84 from austeane/codex/update-ux-improvements-err…
austeane Jul 18, 2025
ce158b9
docs: clarify reset filters ticket
austeane Jul 18, 2025
6d7bf95
docs: update unauthenticated add-to-plan ticket
austeane Jul 18, 2025
382e588
docs: update LLM practice plan ticket
austeane Jul 18, 2025
73edd4d
docs: clarify practice plan filter ticket
austeane Jul 18, 2025
46f74cf
docs: update vercel rewrites ticket
austeane Jul 18, 2025
b467adf
docs: update empty state ticket
austeane Jul 18, 2025
cea0013
Merge pull request #85 from austeane/codex/update-ticket-for-ux-impro…
austeane Jul 18, 2025
44ebe8c
Merge pull request #86 from austeane/codex/update-ticket-ux-improveme…
austeane Jul 18, 2025
60d0d3d
Merge pull request #88 from austeane/codex/update-ticket-for-practice…
austeane Jul 18, 2025
a85cac1
Merge pull request #89 from austeane/codex/update-33-config-vercel-re…
austeane Jul 18, 2025
18c1e86
Merge pull request #90 from austeane/codex/update-ticket-for-ux-impro…
austeane Jul 18, 2025
2b1bff4
docs: update theme consistency ticket
austeane Jul 18, 2025
ecf46c2
docs: update REST conventions ticket
austeane Jul 18, 2025
20d493d
docs: update dead code cleanup ticket
austeane Jul 18, 2025
b05801e
Merge pull request #87 from austeane/codex/update-llm-practice-plan-t…
austeane Jul 18, 2025
3683a33
docs: update ticket 28 to reflect removed stores
austeane Jul 18, 2025
3f41069
Merge pull request #91 from austeane/codex/update-ticket-for-32-confi…
austeane Jul 18, 2025
8d60768
Merge pull request #92 from austeane/codex/update-31-api-rest-convent…
austeane Jul 18, 2025
e71331d
Merge pull request #93 from austeane/codex/update-ticket-for-dead-cod…
austeane Jul 18, 2025
88e7946
Merge pull request #94 from austeane/codex/update-28-cleanup-dead-cod…
austeane Jul 18, 2025
cb31a3a
docs: update ticket on dead components
austeane Jul 18, 2025
3794bee
Merge pull request #95 from austeane/zqo5sr-codex/update-ticket-for-d…
austeane Jul 18, 2025
d5f9257
docs: clarify reactivity issues ticket
austeane Jul 18, 2025
22c15eb
docs: update accessibility review ticket
austeane Jul 18, 2025
e05e453
docs: clarify SQL duplication ticket
austeane Jul 18, 2025
30b2d17
docs: update user service refactor ticket
austeane Jul 18, 2025
dd96856
docs: clarify PracticePlanService update ticket
austeane Jul 18, 2025
b7ce710
docs: update filterpanel refactor ticket
austeane Jul 18, 2025
b9e5c35
docs: update practice plan form ticket
austeane Jul 18, 2025
5ee71bd
docs: update ExcalidrawWrapper refactor ticket
austeane Jul 18, 2025
2011ce2
docs: update drag manager refactor ticket
austeane Jul 18, 2025
b4db0af
docs: update validation ticket
austeane Jul 18, 2025
63310b1
Merge pull request #96 from austeane/codex/update-ticket-26-for-react…
austeane Jul 18, 2025
0c1c751
Merge pull request #97 from austeane/codex/update-24-accessibility-re…
austeane Jul 18, 2025
2080252
Merge pull request #98 from austeane/codex/update-ticket-23-refactor-…
austeane Jul 18, 2025
3d2ba62
Merge pull request #99 from austeane/codex/update-ticket-22-refactor-…
austeane Jul 18, 2025
5d785db
Merge pull request #100 from austeane/codex/update-ticket-21-refactor…
austeane Jul 18, 2025
f8a4093
Merge pull request #101 from austeane/codex/update-19-refactor-filter…
austeane Jul 18, 2025
4228d25
Merge pull request #102 from austeane/codex/update-ticket-18-refactor…
austeane Jul 18, 2025
5fe2a50
Merge pull request #103 from austeane/codex/update-ticket-17-refactor…
austeane Jul 18, 2025
4815dbf
Merge pull request #104 from austeane/codex/update-ticket-16-refactor…
austeane Jul 18, 2025
fa7f643
Merge pull request #105 from austeane/codex/update-ticket-for-14-refa…
austeane Jul 18, 2025
604cdc8
docs: update ticket 11 progress
austeane Jul 18, 2025
5d53b4e
docs: update sectionsStore refactor ticket
austeane Jul 18, 2025
9ecb3d8
docs: update practice plan store refactor ticket
austeane Jul 18, 2025
6c6167a
docs(ticket): update state management unification
austeane Jul 18, 2025
b3e9f0b
docs: update component decoupling ticket
austeane Jul 18, 2025
698d2aa
Merge pull request #106 from austeane/codex/update-11-api-error-handl…
austeane Jul 18, 2025
4cca342
Merge pull request #107 from austeane/codex/update-ticket-for-10-refa…
austeane Jul 18, 2025
a275948
Merge pull request #108 from austeane/codex/update-ticket-for-09-refa…
austeane Jul 18, 2025
640569c
Merge pull request #109 from austeane/codex/update-ticket-for-08-refa…
austeane Jul 18, 2025
4e33d72
Merge pull request #110 from austeane/codex/update-ticket-for-compone…
austeane Jul 18, 2025
072ecab
Implement accessible navigation
austeane Jul 18, 2025
a5e6442
Implement loading state improvements
austeane Jul 18, 2025
3f3c13e
Add custom error pages and boundary
austeane Jul 18, 2025
ed10da2
feat(filters): enable reset for practice plans
austeane Jul 18, 2025
adf123b
Remove obsolete admin migration page and update docs
austeane Jul 18, 2025
64d4bf0
Remove admin migration page
austeane Jul 18, 2025
bf76c39
Remove dead store code and references
austeane Jul 18, 2025
312ad19
Document removed components
austeane Jul 18, 2025
d157a18
refactor: centralize skill count sql
austeane Jul 18, 2025
20e6424
Implement user role system and profile pagination
austeane Jul 18, 2025
a9a8a5c
Decouple dragManager from sectionsStore
austeane Jul 18, 2025
33f5b02
refactor: finalize api error handling
austeane Jul 18, 2025
bbcba1f
fix: import navigating store
austeane Jul 18, 2025
f59c38b
Import navigating store
austeane Jul 18, 2025
496d98c
docs: update error handling ticket progress
austeane Jul 18, 2025
80d0589
refactor: replace store usage
austeane Jul 18, 2025
9a81874
update plan
austeane Jul 18, 2025
9358c47
Fix formatting issues in PR #127
austeane Jul 19, 2025
befea05
Document known issues found during PR #127 verification
austeane Jul 19, 2025
e4a00e6
Merge branch 'main' into tme4ul-codex/update-ticket-23-refactor-sql-d…
austeane Jul 19, 2025
1063d38
Merge PR #127: Refactor SQL duplication - centralize skill count SQL
austeane Jul 19, 2025
5945f9a
Update PR review plan - mark PR #127 as merged
austeane Jul 19, 2025
eab7865
Update PR review plan with PR #135 verification results
austeane Jul 19, 2025
ffeb283
Resolve merge conflict - keep HEAD version with latest progress
austeane Jul 19, 2025
6108c25
Merge pull request #135 from austeane/m3sefp-codex/update-11-api-erro…
austeane Jul 19, 2025
941e30d
Update PR review plan - mark PR #135 as merged
austeane Jul 19, 2025
b4f076f
Fix: Restore graceful degradation for filter options API failure
austeane Jul 19, 2025
9fa1729
Remove redundant Vercel rewrites (#119)
austeane Jul 19, 2025
acfcf33
Update PR review plan: mark PR #119 as merged
austeane Jul 19, 2025
f9a607f
Implement theme consolidation (#120)
austeane Jul 19, 2025
864551c
Update PR review plan: mark PRs #119 and #120 as merged
austeane Jul 19, 2025
ef582c0
Merge branch 'main' of https://github.com/austeane/qdrill
austeane Jul 19, 2025
286bb36
Update PR review plan: mark PR #112 as incomplete
austeane Jul 19, 2025
044ce98
Implement comprehensive loading states across the application
austeane Jul 19, 2025
2816690
Merge main branch and resolve SkeletonLoader conflict
austeane Jul 19, 2025
12011f2
Merge pull request #112 from austeane/0anu39-codex/update-ticket-for-…
austeane Jul 19, 2025
5e4a5f8
Update PR_REVIEW_PLAN.md - mark PR #112 as merged
austeane Jul 19, 2025
67a2237
Keep SkeletonLoader.svelte as it's actively used by loading states fe…
austeane Jul 19, 2025
72e891e
Merge main and resolve conflicts - kept SkeletonLoader.svelte
austeane Jul 19, 2025
a370d52
Merge pull request #125 from austeane/jxjqhp-codex/update-ticket-for-…
austeane Jul 19, 2025
7e4ace8
Merge branch 'main' of https://github.com/austeane/qdrill
austeane Jul 19, 2025
b040e09
Update PR_REVIEW_PLAN.md - mark PR #125 as merged
austeane Jul 19, 2025
c272823
Merge pull request #124 from austeane/3tj4s1-codex/update-28-cleanup-…
austeane Jul 19, 2025
0c78d45
Update PR_REVIEW_PLAN.md - mark PR #124 as merged
austeane Jul 19, 2025
3a2e2aa
Merge pull request #123 from austeane/5f1h5z-codex/update-ticket-for-…
austeane Jul 19, 2025
d609dfd
Update PR_REVIEW_PLAN.md - mark PR #123 as merged
austeane Jul 19, 2025
fbace5b
Merge PR #122: Remove unused admin pages and update dead code cleanup…
austeane Jul 19, 2025
d398938
Merge branch 'iz3fz9-codex/update-ticket-16-refactor-dragmanager'
austeane Jul 19, 2025
8a901b6
feat: Add error handling and backup/restore to moveItem/moveSection f…
austeane Jul 19, 2025
f98b0cb
docs: Update PR_REVIEW_PLAN.md with PR #133/#136 resolution
austeane Jul 19, 2025
82ba3cc
refactor: decouple plan components from store
austeane Jul 18, 2025
7007072
Merge PR #139: Decouple components from sectionsStore
austeane Jul 19, 2025
6be9006
refactor: modularize PracticePlanForm
austeane Jul 18, 2025
c7ae4b5
Fix import paths and missing imports in modularized components
austeane Jul 19, 2025
1c6aa3b
refactor filter panel basics
austeane Jul 18, 2025
007dab2
Fix syntax error in FilterPanel
austeane Jul 19, 2025
43fb21f
Merge pull request #130 from austeane/949sp0-codex/update-19-refactor…
austeane Jul 19, 2025
5cc7d12
Review PR #111: Navigation accessibility - all features working corre…
austeane Jul 20, 2025
88f1ea0
Merge PR #111: Navigation accessibility improvements
austeane Jul 20, 2025
7ca3c92
Merge PR #114: Error handling UX improvements
austeane Jul 20, 2025
18538bf
Merge branch 'review-pr-116'
austeane Jul 20, 2025
95e5242
fix: Fix ErrorBoundary component to use proper Svelte error handling
austeane Jul 20, 2025
ee95b2a
feat: dynamic group filter for practice plans (#121)
austeane Jul 20, 2025
9bc64e2
Fix critical security issues in user role permissions
austeane Jul 20, 2025
5d45a62
Merge main and keep admin pages with security fixes
austeane Jul 20, 2025
f9702a3
Merge pull request #128 from austeane/8uft3z-codex/update-ticket-22-r…
austeane Jul 20, 2025
507fad4
Prevent redundant navigation in drills search to avoid potential loops
cursoragent Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .cursor/rules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Cursor Rules for QDrill Project

This directory contains project-specific rules for AI assistants working on the QDrill codebase.

## Rules Files

- `development.mdc` - Core development commands and workflows

## Key Points to Remember

1. **ALWAYS use `vercel dev`** for development server (NOT pnpm run dev)
2. Use `pnpm` for package management (NOT npm)
3. Use `vercel build` for production builds
4. Use `psql "$NEON_DB_URL"` for database queries

These rules help ensure consistent development practices across all AI assistant sessions.
33 changes: 33 additions & 0 deletions .cursor/rules/development.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
description:
globs:
alwaysApply: true
---
# Development Rules for QDrill Project

## IMPORTANT: Development Server
**ALWAYS use `vercel dev` to run the development server**
- DO NOT use `pnpm run dev`
- DO NOT use `npm run dev`
- The correct command is: `vercel dev`

## Package Management
This project uses pnpm. Always use pnpm commands:
- `pnpm install` (not npm install)
- `pnpm add <package>` (not npm install <package>)
- `pnpm remove <package>` (not npm uninstall)

## Build Commands
- For development server: `vercel dev`
- For production build verification: `vercel build`
- DO NOT use `pnpm run build` for verification

## Database Access
When examining data, use: `psql "$NEON_DB_URL"`

## Summary of Key Commands
- Start dev server: `vercel dev`
- Install dependencies: `pnpm install`
- Add package: `pnpm add <package>`
- Build for production: `vercel build`
- Check database: `psql "$NEON_DB_URL"`
1 change: 1 addition & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
39 changes: 35 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
extends: [
'eslint:recommended',
'plugin:svelte/recommended',
'plugin:cypress/recommended',
'prettier'
],
plugins: ['vitest-globals'],
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaVersion: 2020,
ecmaVersion: 2022,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
}
node: true,
'cypress/globals': true
},
overrides: [
{
files: ['*.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module'
}
},
{
files: ['**/__tests__/**/*.js', '**/__mocks__/**/*.js'],
extends: ['plugin:vitest-globals/recommended']
},
{
files: ['.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2022,
sourceType: 'module'
}
}
]
};
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@ node_modules
/build
/.svelte-kit
/package
venv
app/__pycache__
*.pyc
.env
.env.*
!.env.example
.vercel
.output
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.env*.local
/coverage
.nyc_output
tests/__pycache__
tests/_pycache
cypress/downloads
cypress/screenshots

# Sentry Config File
.env.sentry-build-plugin
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"svelte.plugin.svelte.diagnostics.a11y": false,
"svelte.plugin.svelte.compilerWarnings": {
"a11y-click-events-have-key-events": "ignore",
"a11y-missing-attribute": "ignore",
"a11y-missing-content": "ignore",
"a11y-invalid-attribute": "ignore",
"a11y-label-has-associated-control": "ignore",
"a11y-no-static-element-interactions": "ignore",
"a11y-img-redundant-alt": "ignore",
"a11y-no-noninteractive-element-interactions": "ignore"
}
}
220 changes: 220 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
# QDrill Project Guide

## Project Overview

QDrill is a web-based application designed as a sports drill bank and practice planning tool for a niche sport. It allows users to create, manage, and share drills, as well as plan practices with timeline-based organization.

## Technology Stack

- **Frontend**: SvelteKit
- **Backend**: SvelteKit (API routes)
- **Database**: PostgreSQL (via Vercel Postgres)
- **Styling**: Tailwind CSS
- **Authentication**: Auth.js (Google OAuth)
- **Deployment**: Vercel
- **Diagramming**: Excalidraw
- **Testing**: Playwright, Cypress

## Core Features

### Drill Management

- Create, edit, view, and search drills
- Tag drills with skill level, positions, duration
- Upload diagrams/images for drills
- Upvote/downvote and comment on drills
- Create variations of existing drills

### Practice Plan Creation

- Wizard-based practice plan creation
- Section organization with parallel timelines
- Drag-and-drop editing interface
- Duration tracking and management
- Timeline visualization
- Share and duplicate practice plans

### User System

- Google OAuth authentication
- User profiles
- Permission-based access control
- Personal drill/plan management

## Development Commands

- `vercel dev` - Start development server
- `pnpm run check` - Check TypeScript + SvelteKit sync

## Package Management

- `pnpm install` - Install dependencies
- `pnpm add <package>` - Add a package

## Testing

- `pnpm run test` - Run Playwright tests
- `pnpm test -- tests/test.js` - Run a specific test
- `pnpm run test:unit` - Run Vitest unit tests in watch mode
- `pnpm run test:unit:run` - Run Vitest unit tests once
- `pnpm run test:unit:coverage` - Run Vitest unit tests with coverage
- `pnpm run test:unit --run <file-path>` - Run specific Vitest tests once (e.g., `pnpm run test:unit --run src/lib/stores/__tests__/dragManager.test.js`)

## Code Quality

- `pnpm run lint` - Run linting checks
- `pnpm run format` - Fix formatting issues

## Deployment

- Automatic deployment from GitHub main branch to Vercel

## Architecture

### Frontend Components

- Svelte components organized by feature area
- Modular design with reusable components
- Tailwind CSS for styling with custom components
- Interactive drag-and-drop interface for practice planning

### State Management

- Extensive use of Svelte stores
- Separate stores for different domain concerns
- Custom store implementation with methods
- History tracking with undo/redo support

### API Design

- RESTful API endpoints
- SvelteKit server endpoints (+server.js)
- Standardized response formats
- Parameterized database queries

### Database

- PostgreSQL with connection pooling
- Transaction support for complex operations
- Normalized schema design

#### Database Connection

- **Connection String**: Stored in ~/.zshrc as NEON_DB_URL environment variable
- **Connection Command**: `psql "$NEON_DB_URL"`
- **Project ID**: morning-mountain-82887088
- **Database Name**: verceldb
- **Tables**: drills, practice_plans, practice_plan_sections, practice_plan_drills, users, comments, votes, etc.
- **Query Example**: `psql "$NEON_DB_URL" -c "SELECT COUNT(*) FROM drills;"`

## Key Systems

### Authentication

- Auth.js (formerly NextAuth) integration
- Google OAuth provider
- Session-based authentication
- Authorization middleware

### Drag and Drop

- Complex drag-and-drop system for practice plan editing
- State management via Svelte stores
- Multiple drop targets and interactions
- Timeline-based organization
- Visual feedback during drag operations

### Data Filtering

- Client-side filtering for drills
- Multi-criteria filtering
- Performance optimization for large datasets

## Code Style Guidelines

- **AI-Readability**: Add clear comments to make code easily understood by future AI systems
- **Comments**: Include purpose explanations, input/output expectations, and logic clarifications
- **Imports**: Group imports by source (svelte, lib, components)
- **Components**: Use Svelte components with script/markup/style structure
- **Stores**: Use reactive declarations with $ prefix for store values
- **Error Handling**: Use try/catch with specific error messages
- **API Endpoints**: Return standardized JSON responses with proper status codes
- **Database**: Use parameterized queries to prevent SQL injection
- **Naming**: Use descriptive camelCase for variables/functions, PascalCase for components

## Areas for Improvement

### 1. Drag and Drop System Consolidation

**Impact: High**

- Currently has two parallel drag-and-drop systems
- Consolidate into a single system with consistent interface
- Implement proper state machine for drag operations
- Reduce code complexity and maintenance burden

### 2. API Data Fetching Abstraction

**Impact: High**

- Direct fetch calls scattered throughout components
- Create unified API client with standard methods
- Implement consistent error handling and retry logic
- Add caching and performance optimizations

### 3. Test Coverage Expansion

**Impact: High**

- Minimal testing despite complex UI interactions
- Add unit tests for store logic (especially drag-and-drop)
- Implement integration tests for key user flows
- Set up CI pipeline with automated testing

### 4. Store Logic Separation

**Impact: Medium**

- Store files mix different concerns (data, filtering, etc.)
- Separate into dedicated modules with single responsibilities
- Move complex logic into utility functions
- Improve maintainability and testability

### 5. Performance Optimization

**Impact: Medium**

- Filtering/sorting recalculates on every store update
- Implement memoization for expensive calculations
- Use web workers for heavy operations
- Optimize filter chains and add virtualization

## Documentation Workflow

- After completing any significant task, ALWAYS follow this documentation workflow:

1. First examine `/docs/index.md` to understand the documentation structure
2. Then navigate to the appropriate subdirectory based on the nature of your changes:
- `/docs/architecture/` for architectural changes or patterns
- `/docs/implementation/` for implementation details and technical references
3. Update existing documentation files or create new ones as needed
4. Update index files to reference any new documentation

## Documentation Requirements

- Create/update documentation when modifying .js/.svelte files
- Document component descriptions, usage instructions, and relationships
- Maintain documentation consistency for directory structure
- Consider component interdependencies when making changes
- Follow best practices for Svelte documentation
- Add implementation notes to `/docs/implementation/` for technical patterns
- **README Updates**: Always update the README.md file after completing substantial code edits to reflect the latest changes, features, and usage instructions

## Version Control Guidelines

- **Commit Message Standards**: Write clear, descriptive commit messages explaining what changes were made and why
- **Atomic Commits**: Keep commits focused on a single logical change
- **Pull Request Format**: Include clear descriptions of changes, impact, and testing performed
- **Code Reviews**: Request code reviews for substantial changes
- **No Automatic Commits**: Never commit changes without explicitly being asked to do so
- **Testing Before Commit**: Always run relevant tests before creating a commit
Loading