ai-first-cli 1.3.0 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai-dev/index.db +0 -0
- package/.github/workflows/publish.yml +4 -1
- package/BETA_EVALUATION_REPORT.md +151 -0
- package/CHANGELOG.md +178 -0
- package/PHASE1_USER_SIMULATION.md +56 -0
- package/PHASE2_USER_SIMULATION.md +81 -0
- package/PHASE3_USER_SIMULATION.md +176 -0
- package/README.es.md +18 -0
- package/README.md +80 -1
- package/ai/graph/knowledge-graph.json +10 -0
- package/ai-context/ai_context.md +130 -0
- package/{test-projects/react-app/.ai-dev → ai-context}/ai_rules.md +10 -5
- package/ai-context/architecture.md +136 -0
- package/ai-context/context/features/src.json +69 -0
- package/ai-context/context/features/test-projects.json +69 -0
- package/ai-context/context/flows/App.json +17 -0
- package/ai-context/context/flows/DashboardPage.json +14 -0
- package/ai-context/context/flows/LoginPage.json +14 -0
- package/ai-context/context/flows/admin.json +10 -0
- package/ai-context/context/flows/ai-first.json +9 -0
- package/ai-context/context/flows/androidresources.json +11 -0
- package/ai-context/context/flows/auth.json +13 -0
- package/ai-context/context/flows/authController.json +14 -0
- package/ai-context/context/flows/doctor.json +9 -0
- package/ai-context/context/flows/entrypoints.json +9 -0
- package/ai-context/context/flows/explore.json +9 -0
- package/ai-context/context/flows/fastapiAdapter.json +14 -0
- package/ai-context/context/flows/fastapiadapter.json +11 -0
- package/ai-context/context/flows/index.json +19 -0
- package/ai-context/context/flows/indexer.json +9 -0
- package/ai-context/context/flows/indexstate.json +9 -0
- package/ai-context/context/flows/init.json +22 -0
- package/ai-context/context/flows/main.json +18 -0
- package/ai-context/context/flows/mainactivity.json +9 -0
- package/ai-context/context/flows/models.json +15 -0
- package/ai-context/context/flows/posts.json +15 -0
- package/ai-context/context/flows/repoMapper.json +20 -0
- package/ai-context/context/flows/repomapper.json +11 -0
- package/ai-context/context/flows/routes.json +15 -0
- package/ai-context/context/flows/serializers.json +10 -0
- package/ai-context/context/flows/user.json +23 -0
- package/ai-context/context/flows/views.json +12 -0
- package/{test-projects/react-app/.ai-dev → ai-context}/conventions.md +3 -2
- package/ai-context/dependencies.json +3360 -0
- package/ai-context/entrypoints.md +45 -0
- package/ai-context/index-state.json +196 -0
- package/ai-context/modules.json +901 -0
- package/ai-context/project.json +33 -0
- package/ai-context/repo_map.json +8857 -0
- package/ai-context/repo_map.md +2002 -0
- package/{test-projects/flask-app/.ai-dev → ai-context}/schema.json +1 -1
- package/ai-context/summary.md +46 -0
- package/ai-context/symbols.json +82467 -0
- package/{test-projects/react-app/.ai-dev → ai-context}/tech_stack.md +15 -7
- package/ai-context-evaluation-report-1774223059505.md +206 -0
- package/dist/analyzers/architecture.d.ts.map +1 -1
- package/dist/analyzers/architecture.js +6 -0
- package/dist/analyzers/architecture.js.map +1 -1
- package/dist/analyzers/entrypoints.d.ts.map +1 -1
- package/dist/analyzers/entrypoints.js +105 -0
- package/dist/analyzers/entrypoints.js.map +1 -1
- package/dist/analyzers/symbols.d.ts.map +1 -1
- package/dist/analyzers/symbols.js +72 -1
- package/dist/analyzers/symbols.js.map +1 -1
- package/dist/analyzers/techStack.d.ts +8 -0
- package/dist/analyzers/techStack.d.ts.map +1 -1
- package/dist/analyzers/techStack.js +75 -0
- package/dist/analyzers/techStack.js.map +1 -1
- package/dist/scripts/ai-context-evaluator.js +367 -0
- package/package.json +1 -1
- package/quick-evaluation-report-1774396002305.md +64 -0
- package/quick-evaluator.ts +200 -0
- package/scripts/ai-context-evaluator.ts +440 -0
- package/src/analyzers/architecture.ts +8 -0
- package/src/analyzers/entrypoints.ts +115 -0
- package/src/analyzers/symbols.ts +77 -1
- package/src/analyzers/techStack.ts +93 -0
- package/test_adapters.mjs +11 -11
- package/tests/apex-parser.test.ts +193 -0
- package/tests/cli-commands-batch1.test.ts +808 -0
- package/tests/cli-commands-batch2.test.ts +1113 -0
- package/tests/cli-commands-batch3.test.ts +1128 -0
- package/tests/cli-index.test.ts +1007 -0
- package/tests/cli-init.test.ts +761 -0
- package/tests/salesforce-apex-classes.test.ts +713 -0
- package/tests/salesforce-apex-triggers.test.ts +871 -0
- package/tests/salesforce-custom-objects.test.ts +918 -0
- package/tests/salesforce-flows.test.ts +710 -0
- package/tests/salesforce-lwc.test.ts +963 -0
- package/tests/salesforce-sfdx-integration.test.ts +1125 -0
- package/CONTRIBUTING.md +0 -89
- package/FLOW.md +0 -129
- package/install.sh +0 -188
- package/run-all-tests.sh +0 -184
- package/test-projects/django-app/.ai-dev/ai_context.md +0 -92
- package/test-projects/django-app/.ai-dev/ai_rules.md +0 -47
- package/test-projects/django-app/.ai-dev/architecture.md +0 -57
- package/test-projects/django-app/.ai-dev/cache.json +0 -169
- package/test-projects/django-app/.ai-dev/context/flows/views.json +0 -10
- package/test-projects/django-app/.ai-dev/conventions.md +0 -51
- package/test-projects/django-app/.ai-dev/dependencies.json +0 -312
- package/test-projects/django-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/django-app/.ai-dev/files.json +0 -209
- package/test-projects/django-app/.ai-dev/graph/knowledge-graph.json +0 -36
- package/test-projects/django-app/.ai-dev/graph/module-graph.json +0 -145
- package/test-projects/django-app/.ai-dev/graph/symbol-graph.json +0 -1488
- package/test-projects/django-app/.ai-dev/graph/symbol-references.json +0 -1
- package/test-projects/django-app/.ai-dev/index-state.json +0 -294
- package/test-projects/django-app/.ai-dev/modules.json +0 -35
- package/test-projects/django-app/.ai-dev/project.json +0 -11
- package/test-projects/django-app/.ai-dev/repo_map.json +0 -412
- package/test-projects/django-app/.ai-dev/repo_map.md +0 -105
- package/test-projects/django-app/.ai-dev/schema.json +0 -5
- package/test-projects/django-app/.ai-dev/summary.md +0 -15
- package/test-projects/django-app/.ai-dev/symbols.json +0 -1
- package/test-projects/django-app/.ai-dev/tech_stack.md +0 -32
- package/test-projects/django-app/README.md +0 -91
- package/test-projects/django-app/blog/__init__.py +0 -0
- package/test-projects/django-app/blog/admin.py +0 -31
- package/test-projects/django-app/blog/models.py +0 -55
- package/test-projects/django-app/blog/serializers.py +0 -69
- package/test-projects/django-app/blog/urls.py +0 -14
- package/test-projects/django-app/blog/views.py +0 -96
- package/test-projects/django-app/django_app/__init__.py +0 -0
- package/test-projects/django-app/django_app/settings.py +0 -90
- package/test-projects/django-app/django_app/urls.py +0 -11
- package/test-projects/django-app/django_app/wsgi.py +0 -9
- package/test-projects/django-app/manage.py +0 -23
- package/test-projects/django-app/requirements.txt +0 -3
- package/test-projects/django-app/users/__init__.py +0 -0
- package/test-projects/django-app/users/admin.py +0 -42
- package/test-projects/django-app/users/models.py +0 -54
- package/test-projects/django-app/users/serializers.py +0 -113
- package/test-projects/django-app/users/urls.py +0 -13
- package/test-projects/django-app/users/views.py +0 -135
- package/test-projects/express-api/.ai-dev/ai_context.md +0 -112
- package/test-projects/express-api/.ai-dev/ai_rules.md +0 -50
- package/test-projects/express-api/.ai-dev/architecture.md +0 -62
- package/test-projects/express-api/.ai-dev/context/features/controllers.json +0 -13
- package/test-projects/express-api/.ai-dev/context/features/services.json +0 -13
- package/test-projects/express-api/.ai-dev/context/flows/auth.json +0 -12
- package/test-projects/express-api/.ai-dev/context/flows/user.json +0 -13
- package/test-projects/express-api/.ai-dev/conventions.md +0 -51
- package/test-projects/express-api/.ai-dev/dependencies.json +0 -54
- package/test-projects/express-api/.ai-dev/entrypoints.md +0 -17
- package/test-projects/express-api/.ai-dev/modules.json +0 -30
- package/test-projects/express-api/.ai-dev/project.json +0 -15
- package/test-projects/express-api/.ai-dev/repo_map.json +0 -100
- package/test-projects/express-api/.ai-dev/repo_map.md +0 -36
- package/test-projects/express-api/.ai-dev/schema.json +0 -5
- package/test-projects/express-api/.ai-dev/summary.md +0 -14
- package/test-projects/express-api/.ai-dev/symbols.json +0 -7
- package/test-projects/express-api/.ai-dev/tech_stack.md +0 -38
- package/test-projects/express-api/.ai-dev/tools.json +0 -10
- package/test-projects/express-api/controllers/authController.js +0 -32
- package/test-projects/express-api/controllers/userController.js +0 -51
- package/test-projects/express-api/index.js +0 -30
- package/test-projects/express-api/middleware/authMiddleware.js +0 -30
- package/test-projects/express-api/models/userRepository.js +0 -25
- package/test-projects/express-api/package.json +0 -18
- package/test-projects/express-api/services/authService.js +0 -17
- package/test-projects/express-api/services/userService.js +0 -28
- package/test-projects/fastapi-app/.ai-dev/ai_context.md +0 -89
- package/test-projects/fastapi-app/.ai-dev/ai_rules.md +0 -47
- package/test-projects/fastapi-app/.ai-dev/architecture.md +0 -39
- package/test-projects/fastapi-app/.ai-dev/cache.json +0 -125
- package/test-projects/fastapi-app/.ai-dev/conventions.md +0 -51
- package/test-projects/fastapi-app/.ai-dev/dependencies.json +0 -244
- package/test-projects/fastapi-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/fastapi-app/.ai-dev/files.json +0 -154
- package/test-projects/fastapi-app/.ai-dev/graph/knowledge-graph.json +0 -15
- package/test-projects/fastapi-app/.ai-dev/graph/module-graph.json +0 -78
- package/test-projects/fastapi-app/.ai-dev/graph/symbol-graph.json +0 -1724
- package/test-projects/fastapi-app/.ai-dev/graph/symbol-references.json +0 -51
- package/test-projects/fastapi-app/.ai-dev/index-state.json +0 -217
- package/test-projects/fastapi-app/.ai-dev/modules.json +0 -16
- package/test-projects/fastapi-app/.ai-dev/project.json +0 -9
- package/test-projects/fastapi-app/.ai-dev/repo_map.json +0 -298
- package/test-projects/fastapi-app/.ai-dev/repo_map.md +0 -74
- package/test-projects/fastapi-app/.ai-dev/schema.json +0 -5
- package/test-projects/fastapi-app/.ai-dev/summary.md +0 -12
- package/test-projects/fastapi-app/.ai-dev/symbols.json +0 -1
- package/test-projects/fastapi-app/.ai-dev/tech_stack.md +0 -32
- package/test-projects/fastapi-app/.ai-dev/tools.json +0 -10
- package/test-projects/fastapi-app/README.md +0 -118
- package/test-projects/fastapi-app/app/database.py +0 -21
- package/test-projects/fastapi-app/app/dependencies.py +0 -107
- package/test-projects/fastapi-app/app/main.py +0 -47
- package/test-projects/fastapi-app/app/models.py +0 -149
- package/test-projects/fastapi-app/app/routers/auth.py +0 -117
- package/test-projects/fastapi-app/app/routers/posts.py +0 -272
- package/test-projects/fastapi-app/app/schemas.py +0 -191
- package/test-projects/fastapi-app/requirements.txt +0 -10
- package/test-projects/flask-app/.ai-dev/ai_context.md +0 -94
- package/test-projects/flask-app/.ai-dev/ai_rules.md +0 -47
- package/test-projects/flask-app/.ai-dev/architecture.md +0 -49
- package/test-projects/flask-app/.ai-dev/cache.json +0 -157
- package/test-projects/flask-app/.ai-dev/context/features/app.json +0 -25
- package/test-projects/flask-app/.ai-dev/context/flows/routes.json +0 -14
- package/test-projects/flask-app/.ai-dev/conventions.md +0 -51
- package/test-projects/flask-app/.ai-dev/dependencies.json +0 -298
- package/test-projects/flask-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/flask-app/.ai-dev/files.json +0 -194
- package/test-projects/flask-app/.ai-dev/graph/knowledge-graph.json +0 -60
- package/test-projects/flask-app/.ai-dev/graph/module-graph.json +0 -95
- package/test-projects/flask-app/.ai-dev/graph/symbol-graph.json +0 -1448
- package/test-projects/flask-app/.ai-dev/graph/symbol-references.json +0 -45
- package/test-projects/flask-app/.ai-dev/index-state.json +0 -273
- package/test-projects/flask-app/.ai-dev/modules.json +0 -21
- package/test-projects/flask-app/.ai-dev/project.json +0 -13
- package/test-projects/flask-app/.ai-dev/repo_map.json +0 -400
- package/test-projects/flask-app/.ai-dev/repo_map.md +0 -98
- package/test-projects/flask-app/.ai-dev/summary.md +0 -13
- package/test-projects/flask-app/.ai-dev/symbols.json +0 -1
- package/test-projects/flask-app/.ai-dev/tech_stack.md +0 -32
- package/test-projects/flask-app/.ai-dev/tools.json +0 -10
- package/test-projects/flask-app/README.md +0 -129
- package/test-projects/flask-app/app/__init__.py +0 -46
- package/test-projects/flask-app/app/api/__init__.py +0 -7
- package/test-projects/flask-app/app/api/routes.py +0 -122
- package/test-projects/flask-app/app/auth/__init__.py +0 -7
- package/test-projects/flask-app/app/auth/forms.py +0 -52
- package/test-projects/flask-app/app/auth/routes.py +0 -68
- package/test-projects/flask-app/app/blog/__init__.py +0 -7
- package/test-projects/flask-app/app/blog/forms.py +0 -35
- package/test-projects/flask-app/app/blog/routes.py +0 -140
- package/test-projects/flask-app/app/main/__init__.py +0 -7
- package/test-projects/flask-app/app/main/routes.py +0 -88
- package/test-projects/flask-app/app/models.py +0 -177
- package/test-projects/flask-app/config.py +0 -64
- package/test-projects/flask-app/requirements.txt +0 -10
- package/test-projects/laravel-app/.ai-dev/ai_context.md +0 -97
- package/test-projects/laravel-app/.ai-dev/ai_rules.md +0 -47
- package/test-projects/laravel-app/.ai-dev/architecture.md +0 -60
- package/test-projects/laravel-app/.ai-dev/cache.json +0 -161
- package/test-projects/laravel-app/.ai-dev/context/features/app.json +0 -21
- package/test-projects/laravel-app/.ai-dev/context/flows/.json +0 -9
- package/test-projects/laravel-app/.ai-dev/context/flows/category.json +0 -12
- package/test-projects/laravel-app/.ai-dev/context/flows/comment.json +0 -12
- package/test-projects/laravel-app/.ai-dev/context/flows/post.json +0 -12
- package/test-projects/laravel-app/.ai-dev/context/flows/unnamed.json +0 -9
- package/test-projects/laravel-app/.ai-dev/conventions.md +0 -51
- package/test-projects/laravel-app/.ai-dev/dependencies.json +0 -6
- package/test-projects/laravel-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/laravel-app/.ai-dev/files.json +0 -199
- package/test-projects/laravel-app/.ai-dev/graph/knowledge-graph.json +0 -98
- package/test-projects/laravel-app/.ai-dev/graph/module-graph.json +0 -30
- package/test-projects/laravel-app/.ai-dev/graph/symbol-graph.json +0 -5
- package/test-projects/laravel-app/.ai-dev/graph/symbol-references.json +0 -1
- package/test-projects/laravel-app/.ai-dev/index-state.json +0 -280
- package/test-projects/laravel-app/.ai-dev/modules.json +0 -29
- package/test-projects/laravel-app/.ai-dev/project.json +0 -17
- package/test-projects/laravel-app/.ai-dev/repo_map.json +0 -419
- package/test-projects/laravel-app/.ai-dev/repo_map.md +0 -106
- package/test-projects/laravel-app/.ai-dev/schema.json +0 -5
- package/test-projects/laravel-app/.ai-dev/summary.md +0 -15
- package/test-projects/laravel-app/.ai-dev/symbols.json +0 -1
- package/test-projects/laravel-app/.ai-dev/tech_stack.md +0 -34
- package/test-projects/laravel-app/.ai-dev/tools.json +0 -10
- package/test-projects/laravel-app/README.md +0 -107
- package/test-projects/laravel-app/app/Http/Controllers/Api/CategoryController.php +0 -88
- package/test-projects/laravel-app/app/Http/Controllers/Api/CommentController.php +0 -56
- package/test-projects/laravel-app/app/Http/Controllers/Api/PostController.php +0 -174
- package/test-projects/laravel-app/app/Http/Controllers/Controller.php +0 -12
- package/test-projects/laravel-app/app/Models/Category.php +0 -34
- package/test-projects/laravel-app/app/Models/Comment.php +0 -51
- package/test-projects/laravel-app/app/Models/Post.php +0 -108
- package/test-projects/laravel-app/app/Models/User.php +0 -85
- package/test-projects/laravel-app/bootstrap/app.php +0 -25
- package/test-projects/laravel-app/composer.json +0 -35
- package/test-projects/laravel-app/routes/api.php +0 -40
- package/test-projects/nestjs-backend/.ai-dev/ai_context.md +0 -111
- package/test-projects/nestjs-backend/.ai-dev/ai_rules.md +0 -52
- package/test-projects/nestjs-backend/.ai-dev/architecture.md +0 -49
- package/test-projects/nestjs-backend/.ai-dev/cache.json +0 -169
- package/test-projects/nestjs-backend/.ai-dev/context/features/src.json +0 -23
- package/test-projects/nestjs-backend/.ai-dev/context/flows/auth.controller.json +0 -14
- package/test-projects/nestjs-backend/.ai-dev/context/flows/auth.json +0 -10
- package/test-projects/nestjs-backend/.ai-dev/context/flows/users..json +0 -10
- package/test-projects/nestjs-backend/.ai-dev/context/flows/users.controller.json +0 -14
- package/test-projects/nestjs-backend/.ai-dev/context/flows/users.json +0 -10
- package/test-projects/nestjs-backend/.ai-dev/conventions.md +0 -52
- package/test-projects/nestjs-backend/.ai-dev/dependencies.json +0 -152
- package/test-projects/nestjs-backend/.ai-dev/entrypoints.md +0 -18
- package/test-projects/nestjs-backend/.ai-dev/files.json +0 -209
- package/test-projects/nestjs-backend/.ai-dev/graph/knowledge-graph.json +0 -132
- package/test-projects/nestjs-backend/.ai-dev/graph/module-graph.json +0 -29
- package/test-projects/nestjs-backend/.ai-dev/graph/symbol-graph.json +0 -304
- package/test-projects/nestjs-backend/.ai-dev/graph/symbol-references.json +0 -5
- package/test-projects/nestjs-backend/.ai-dev/index-state.json +0 -294
- package/test-projects/nestjs-backend/.ai-dev/modules.json +0 -19
- package/test-projects/nestjs-backend/.ai-dev/project.json +0 -18
- package/test-projects/nestjs-backend/.ai-dev/repo_map.json +0 -427
- package/test-projects/nestjs-backend/.ai-dev/repo_map.md +0 -104
- package/test-projects/nestjs-backend/.ai-dev/schema.json +0 -5
- package/test-projects/nestjs-backend/.ai-dev/summary.md +0 -13
- package/test-projects/nestjs-backend/.ai-dev/symbols.json +0 -1
- package/test-projects/nestjs-backend/.ai-dev/tech_stack.md +0 -38
- package/test-projects/nestjs-backend/.ai-dev/tools.json +0 -10
- package/test-projects/nestjs-backend/package.json +0 -22
- package/test-projects/nestjs-backend/src/app.module.ts +0 -8
- package/test-projects/nestjs-backend/src/auth/auth.controller.ts +0 -22
- package/test-projects/nestjs-backend/src/auth/auth.module.ts +0 -11
- package/test-projects/nestjs-backend/src/auth/auth.service.ts +0 -28
- package/test-projects/nestjs-backend/src/auth/dto/login.dto.ts +0 -4
- package/test-projects/nestjs-backend/src/auth/strategies/jwt.strategy.ts +0 -18
- package/test-projects/nestjs-backend/src/main.ts +0 -9
- package/test-projects/nestjs-backend/src/users/users.controller.ts +0 -32
- package/test-projects/nestjs-backend/src/users/users.module.ts +0 -10
- package/test-projects/nestjs-backend/src/users/users.service.ts +0 -42
- package/test-projects/nestjs-backend/tsconfig.json +0 -21
- package/test-projects/python-cli/.ai-dev/ai_context.md +0 -95
- package/test-projects/python-cli/.ai-dev/ai_rules.md +0 -47
- package/test-projects/python-cli/.ai-dev/architecture.md +0 -55
- package/test-projects/python-cli/.ai-dev/cache.json +0 -149
- package/test-projects/python-cli/.ai-dev/context/features/cli.json +0 -16
- package/test-projects/python-cli/.ai-dev/context/flows/list_.json +0 -9
- package/test-projects/python-cli/.ai-dev/context/flows/remove_.json +0 -9
- package/test-projects/python-cli/.ai-dev/conventions.md +0 -51
- package/test-projects/python-cli/.ai-dev/dependencies.json +0 -66
- package/test-projects/python-cli/.ai-dev/entrypoints.md +0 -4
- package/test-projects/python-cli/.ai-dev/files.json +0 -184
- package/test-projects/python-cli/.ai-dev/graph/knowledge-graph.json +0 -83
- package/test-projects/python-cli/.ai-dev/graph/module-graph.json +0 -31
- package/test-projects/python-cli/.ai-dev/graph/symbol-graph.json +0 -358
- package/test-projects/python-cli/.ai-dev/graph/symbol-references.json +0 -11
- package/test-projects/python-cli/.ai-dev/index-state.json +0 -259
- package/test-projects/python-cli/.ai-dev/modules.json +0 -21
- package/test-projects/python-cli/.ai-dev/project.json +0 -15
- package/test-projects/python-cli/.ai-dev/repo_map.json +0 -367
- package/test-projects/python-cli/.ai-dev/repo_map.md +0 -93
- package/test-projects/python-cli/.ai-dev/schema.json +0 -5
- package/test-projects/python-cli/.ai-dev/summary.md +0 -14
- package/test-projects/python-cli/.ai-dev/symbols.json +0 -1
- package/test-projects/python-cli/.ai-dev/tech_stack.md +0 -32
- package/test-projects/python-cli/.ai-dev/tools.json +0 -10
- package/test-projects/python-cli/__init__.py +0 -1
- package/test-projects/python-cli/cli/__init__.py +0 -1
- package/test-projects/python-cli/cli/add_command.py +0 -6
- package/test-projects/python-cli/cli/list_command.py +0 -7
- package/test-projects/python-cli/cli/remove_command.py +0 -6
- package/test-projects/python-cli/main.py +0 -34
- package/test-projects/python-cli/models/__init__.py +0 -2
- package/test-projects/python-cli/models/task.py +0 -19
- package/test-projects/python-cli/models/task_repository.py +0 -44
- package/test-projects/rails-app/.ai-dev/ai_context.md +0 -94
- package/test-projects/rails-app/.ai-dev/ai_rules.md +0 -47
- package/test-projects/rails-app/.ai-dev/architecture.md +0 -49
- package/test-projects/rails-app/.ai-dev/cache.json +0 -193
- package/test-projects/rails-app/.ai-dev/context/features/app.json +0 -24
- package/test-projects/rails-app/.ai-dev/context/features/config.json +0 -13
- package/test-projects/rails-app/.ai-dev/context/flows/application.json +0 -9
- package/test-projects/rails-app/.ai-dev/context/flows/application_.json +0 -9
- package/test-projects/rails-app/.ai-dev/context/flows/comments.json +0 -11
- package/test-projects/rails-app/.ai-dev/context/flows/comments_.json +0 -11
- package/test-projects/rails-app/.ai-dev/context/flows/posts.json +0 -11
- package/test-projects/rails-app/.ai-dev/context/flows/posts_.json +0 -11
- package/test-projects/rails-app/.ai-dev/context/flows/routes.json +0 -9
- package/test-projects/rails-app/.ai-dev/context/flows/users.json +0 -11
- package/test-projects/rails-app/.ai-dev/context/flows/users_.json +0 -11
- package/test-projects/rails-app/.ai-dev/conventions.md +0 -51
- package/test-projects/rails-app/.ai-dev/dependencies.json +0 -6
- package/test-projects/rails-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/rails-app/.ai-dev/files.json +0 -239
- package/test-projects/rails-app/.ai-dev/graph/knowledge-graph.json +0 -130
- package/test-projects/rails-app/.ai-dev/graph/module-graph.json +0 -27
- package/test-projects/rails-app/.ai-dev/graph/symbol-graph.json +0 -5
- package/test-projects/rails-app/.ai-dev/graph/symbol-references.json +0 -1
- package/test-projects/rails-app/.ai-dev/index-state.json +0 -336
- package/test-projects/rails-app/.ai-dev/modules.json +0 -26
- package/test-projects/rails-app/.ai-dev/project.json +0 -22
- package/test-projects/rails-app/.ai-dev/repo_map.json +0 -486
- package/test-projects/rails-app/.ai-dev/repo_map.md +0 -117
- package/test-projects/rails-app/.ai-dev/schema.json +0 -5
- package/test-projects/rails-app/.ai-dev/summary.md +0 -13
- package/test-projects/rails-app/.ai-dev/symbols.json +0 -1
- package/test-projects/rails-app/.ai-dev/tech_stack.md +0 -32
- package/test-projects/rails-app/.ai-dev/tools.json +0 -10
- package/test-projects/rails-app/Gemfile +0 -38
- package/test-projects/rails-app/README.md +0 -140
- package/test-projects/rails-app/Rakefile +0 -8
- package/test-projects/rails-app/app/controllers/api/comments_controller.rb +0 -75
- package/test-projects/rails-app/app/controllers/api/posts_controller.rb +0 -68
- package/test-projects/rails-app/app/controllers/api/users_controller.rb +0 -54
- package/test-projects/rails-app/app/controllers/application_controller.rb +0 -31
- package/test-projects/rails-app/app/models/comment.rb +0 -34
- package/test-projects/rails-app/app/models/post.rb +0 -36
- package/test-projects/rails-app/app/models/user.rb +0 -28
- package/test-projects/rails-app/app/services/post_service.rb +0 -92
- package/test-projects/rails-app/app/services/user_service.rb +0 -76
- package/test-projects/rails-app/config/application.rb +0 -27
- package/test-projects/rails-app/config/environment.rb +0 -7
- package/test-projects/rails-app/config/routes.rb +0 -15
- package/test-projects/react-app/.ai-dev/ai_context.md +0 -96
- package/test-projects/react-app/.ai-dev/architecture.md +0 -39
- package/test-projects/react-app/.ai-dev/cache.json +0 -153
- package/test-projects/react-app/.ai-dev/context/features/src.json +0 -18
- package/test-projects/react-app/.ai-dev/context/flows/UsersPage.json +0 -14
- package/test-projects/react-app/.ai-dev/context/flows/dashboard.json +0 -9
- package/test-projects/react-app/.ai-dev/context/flows/login.json +0 -9
- package/test-projects/react-app/.ai-dev/context/flows/users.json +0 -9
- package/test-projects/react-app/.ai-dev/dependencies.json +0 -128
- package/test-projects/react-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/react-app/.ai-dev/files.json +0 -189
- package/test-projects/react-app/.ai-dev/graph/knowledge-graph.json +0 -112
- package/test-projects/react-app/.ai-dev/graph/module-graph.json +0 -31
- package/test-projects/react-app/.ai-dev/graph/symbol-graph.json +0 -868
- package/test-projects/react-app/.ai-dev/graph/symbol-references.json +0 -31
- package/test-projects/react-app/.ai-dev/index-state.json +0 -266
- package/test-projects/react-app/.ai-dev/modules.json +0 -17
- package/test-projects/react-app/.ai-dev/project.json +0 -16
- package/test-projects/react-app/.ai-dev/repo_map.json +0 -391
- package/test-projects/react-app/.ai-dev/repo_map.md +0 -94
- package/test-projects/react-app/.ai-dev/schema.json +0 -5
- package/test-projects/react-app/.ai-dev/summary.md +0 -13
- package/test-projects/react-app/.ai-dev/symbols.json +0 -1
- package/test-projects/react-app/.ai-dev/tools.json +0 -10
- package/test-projects/react-app/package.json +0 -16
- package/test-projects/react-app/src/App.tsx +0 -21
- package/test-projects/react-app/src/context/AuthContext.tsx +0 -41
- package/test-projects/react-app/src/hooks/useAuth.ts +0 -10
- package/test-projects/react-app/src/main.tsx +0 -10
- package/test-projects/react-app/src/pages/DashboardPage.tsx +0 -17
- package/test-projects/react-app/src/pages/LoginPage.tsx +0 -41
- package/test-projects/react-app/src/pages/UsersPage.tsx +0 -36
- package/test-projects/react-app/src/services/userService.ts +0 -37
- package/test-projects/salesforce-cli/.ai-dev/ai_context.md +0 -89
- package/test-projects/salesforce-cli/.ai-dev/ai_rules.md +0 -47
- package/test-projects/salesforce-cli/.ai-dev/architecture.md +0 -39
- package/test-projects/salesforce-cli/.ai-dev/cache.json +0 -125
- package/test-projects/salesforce-cli/.ai-dev/context/features/force-app.json +0 -14
- package/test-projects/salesforce-cli/.ai-dev/context/flows/account.json +0 -9
- package/test-projects/salesforce-cli/.ai-dev/context/flows/opportunity.json +0 -9
- package/test-projects/salesforce-cli/.ai-dev/conventions.md +0 -51
- package/test-projects/salesforce-cli/.ai-dev/dependencies.json +0 -6
- package/test-projects/salesforce-cli/.ai-dev/entrypoints.md +0 -4
- package/test-projects/salesforce-cli/.ai-dev/files.json +0 -154
- package/test-projects/salesforce-cli/.ai-dev/graph/knowledge-graph.json +0 -64
- package/test-projects/salesforce-cli/.ai-dev/graph/module-graph.json +0 -13
- package/test-projects/salesforce-cli/.ai-dev/graph/symbol-graph.json +0 -148
- package/test-projects/salesforce-cli/.ai-dev/graph/symbol-references.json +0 -1
- package/test-projects/salesforce-cli/.ai-dev/index-state.json +0 -217
- package/test-projects/salesforce-cli/.ai-dev/modules.json +0 -12
- package/test-projects/salesforce-cli/.ai-dev/project.json +0 -14
- package/test-projects/salesforce-cli/.ai-dev/repo_map.json +0 -328
- package/test-projects/salesforce-cli/.ai-dev/repo_map.md +0 -80
- package/test-projects/salesforce-cli/.ai-dev/schema.json +0 -5
- package/test-projects/salesforce-cli/.ai-dev/summary.md +0 -13
- package/test-projects/salesforce-cli/.ai-dev/symbols.json +0 -1
- package/test-projects/salesforce-cli/.ai-dev/tech_stack.md +0 -31
- package/test-projects/salesforce-cli/.ai-dev/tools.json +0 -10
- package/test-projects/salesforce-cli/.forceignore +0 -27
- package/test-projects/salesforce-cli/force-app/main/default/classes/AccountController.cls +0 -24
- package/test-projects/salesforce-cli/force-app/main/default/classes/OpportunityController.cls +0 -25
- package/test-projects/salesforce-cli/force-app/main/default/objects/Project__c.object.xml +0 -45
- package/test-projects/salesforce-cli/force-app/main/default/triggers/AccountTrigger.trigger +0 -33
- package/test-projects/salesforce-cli/sfdx-project.json +0 -11
- package/test-projects/spring-boot-app/.ai-dev/ai_context.md +0 -91
- package/test-projects/spring-boot-app/.ai-dev/ai_rules.md +0 -48
- package/test-projects/spring-boot-app/.ai-dev/architecture.md +0 -39
- package/test-projects/spring-boot-app/.ai-dev/cache.json +0 -173
- package/test-projects/spring-boot-app/.ai-dev/context/features/src.json +0 -26
- package/test-projects/spring-boot-app/.ai-dev/context/flows/PostController.json +0 -19
- package/test-projects/spring-boot-app/.ai-dev/context/flows/UserController.json +0 -19
- package/test-projects/spring-boot-app/.ai-dev/context/flows/comment.json +0 -11
- package/test-projects/spring-boot-app/.ai-dev/context/flows/post.json +0 -14
- package/test-projects/spring-boot-app/.ai-dev/context/flows/user.json +0 -14
- package/test-projects/spring-boot-app/.ai-dev/conventions.md +0 -52
- package/test-projects/spring-boot-app/.ai-dev/dependencies.json +0 -326
- package/test-projects/spring-boot-app/.ai-dev/entrypoints.md +0 -4
- package/test-projects/spring-boot-app/.ai-dev/files.json +0 -214
- package/test-projects/spring-boot-app/.ai-dev/graph/knowledge-graph.json +0 -231
- package/test-projects/spring-boot-app/.ai-dev/graph/module-graph.json +0 -22
- package/test-projects/spring-boot-app/.ai-dev/graph/symbol-graph.json +0 -794
- package/test-projects/spring-boot-app/.ai-dev/graph/symbol-references.json +0 -70
- package/test-projects/spring-boot-app/.ai-dev/index-state.json +0 -301
- package/test-projects/spring-boot-app/.ai-dev/modules.json +0 -21
- package/test-projects/spring-boot-app/.ai-dev/project.json +0 -17
- package/test-projects/spring-boot-app/.ai-dev/repo_map.json +0 -461
- package/test-projects/spring-boot-app/.ai-dev/repo_map.md +0 -109
- package/test-projects/spring-boot-app/.ai-dev/schema.json +0 -5
- package/test-projects/spring-boot-app/.ai-dev/summary.md +0 -12
- package/test-projects/spring-boot-app/.ai-dev/symbols.json +0 -1
- package/test-projects/spring-boot-app/.ai-dev/tech_stack.md +0 -32
- package/test-projects/spring-boot-app/.ai-dev/tools.json +0 -10
- package/test-projects/spring-boot-app/.classpath +0 -57
- package/test-projects/spring-boot-app/.factorypath +0 -69
- package/test-projects/spring-boot-app/.project +0 -34
- package/test-projects/spring-boot-app/.settings/org.eclipse.core.resources.prefs +0 -4
- package/test-projects/spring-boot-app/.settings/org.eclipse.jdt.apt.core.prefs +0 -4
- package/test-projects/spring-boot-app/.settings/org.eclipse.jdt.core.prefs +0 -10
- package/test-projects/spring-boot-app/.settings/org.eclipse.m2e.core.prefs +0 -4
- package/test-projects/spring-boot-app/README.md +0 -122
- package/test-projects/spring-boot-app/pom.xml +0 -79
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/DemoApplication.java +0 -12
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/controllers/CommentController.java +0 -89
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/controllers/PostController.java +0 -92
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/controllers/UserController.java +0 -84
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/models/Comment.java +0 -38
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/models/Post.java +0 -56
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/models/User.java +0 -44
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/repositories/CommentRepository.java +0 -21
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/repositories/PostRepository.java +0 -18
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/repositories/UserRepository.java +0 -15
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/services/PostService.java +0 -83
- package/test-projects/spring-boot-app/src/main/java/com/example/demo/services/UserService.java +0 -62
- package/test-projects/spring-boot-app/src/main/resources/application.properties +0 -22
- package/test-projects/spring-boot-app/target/classes/com/example/demo/DemoApplication.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/CommentController$CommentCreateRequest.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/CommentController$CommentUpdateRequest.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/CommentController.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/PostController$PostCreateRequest.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/PostController$PostUpdateRequest.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/PostController.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/UserController$UserCreateRequest.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/UserController$UserUpdateRequest.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/controllers/UserController.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/models/Comment.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/models/Post.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/models/User.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/repositories/CommentRepository.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/repositories/PostRepository.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/repositories/UserRepository.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/services/PostService.class +0 -0
- package/test-projects/spring-boot-app/target/classes/com/example/demo/services/UserService.class +0 -0
- package/tests/e2e/run-e2e.sh +0 -88
- /package/{test-projects/django-app/.ai-dev → ai-context}/tools.json +0 -0
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"""Users application views."""
|
|
2
|
-
|
|
3
|
-
from rest_framework import viewsets, status, generics
|
|
4
|
-
from rest_framework.decorators import action
|
|
5
|
-
from rest_framework.response import Response
|
|
6
|
-
from rest_framework.permissions import IsAuthenticated, AllowAny
|
|
7
|
-
from django.contrib.auth.models import User
|
|
8
|
-
from django.contrib.auth import authenticate
|
|
9
|
-
from .models import UserProfile, Follow
|
|
10
|
-
from .serializers import (
|
|
11
|
-
UserSerializer,
|
|
12
|
-
UserCreateSerializer,
|
|
13
|
-
UserProfileSerializer,
|
|
14
|
-
FollowSerializer,
|
|
15
|
-
ChangePasswordSerializer,
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class UserViewSet(viewsets.ModelViewSet):
|
|
20
|
-
"""ViewSet for users."""
|
|
21
|
-
|
|
22
|
-
queryset = User.objects.all()
|
|
23
|
-
serializer_class = UserSerializer
|
|
24
|
-
|
|
25
|
-
def get_permissions(self):
|
|
26
|
-
"""Allow anyone to register, but only authenticated users for other actions."""
|
|
27
|
-
if self.action == "create":
|
|
28
|
-
return [AllowAny()]
|
|
29
|
-
return [IsAuthenticated()]
|
|
30
|
-
|
|
31
|
-
def get_serializer_class(self):
|
|
32
|
-
"""Return appropriate serializer class."""
|
|
33
|
-
if self.action == "create":
|
|
34
|
-
return UserCreateSerializer
|
|
35
|
-
return UserSerializer
|
|
36
|
-
|
|
37
|
-
@action(detail=False, methods=["get"])
|
|
38
|
-
def me(self, request):
|
|
39
|
-
"""Get current user profile."""
|
|
40
|
-
serializer = UserSerializer(request.user)
|
|
41
|
-
return Response(serializer.data)
|
|
42
|
-
|
|
43
|
-
@action(detail=False, methods=["put", "patch"])
|
|
44
|
-
def update_profile(self, request):
|
|
45
|
-
"""Update current user profile."""
|
|
46
|
-
user = request.user
|
|
47
|
-
profile = user.profile
|
|
48
|
-
|
|
49
|
-
# Update user data
|
|
50
|
-
user_serializer = UserSerializer(user, data=request.data, partial=True)
|
|
51
|
-
if user_serializer.is_valid():
|
|
52
|
-
user_serializer.save()
|
|
53
|
-
|
|
54
|
-
# Update profile data
|
|
55
|
-
if "profile" in request.data:
|
|
56
|
-
profile_serializer = UserProfileSerializer(
|
|
57
|
-
profile, data=request.data["profile"], partial=True
|
|
58
|
-
)
|
|
59
|
-
if profile_serializer.is_valid():
|
|
60
|
-
profile_serializer.save()
|
|
61
|
-
|
|
62
|
-
return Response(UserSerializer(user).data)
|
|
63
|
-
|
|
64
|
-
@action(detail=False, methods=["post"])
|
|
65
|
-
def change_password(self, request):
|
|
66
|
-
"""Change user password."""
|
|
67
|
-
serializer = ChangePasswordSerializer(data=request.data)
|
|
68
|
-
if serializer.is_valid():
|
|
69
|
-
user = request.user
|
|
70
|
-
if user.check_password(serializer.validated_data["old_password"]):
|
|
71
|
-
user.set_password(serializer.validated_data["new_password"])
|
|
72
|
-
user.save()
|
|
73
|
-
return Response({"status": "password changed"})
|
|
74
|
-
return Response(
|
|
75
|
-
{"error": "Wrong old password"}, status=status.HTTP_400_BAD_REQUEST
|
|
76
|
-
)
|
|
77
|
-
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
|
78
|
-
|
|
79
|
-
@action(detail=True, methods=["post"])
|
|
80
|
-
def follow(self, request, pk=None):
|
|
81
|
-
"""Follow a user."""
|
|
82
|
-
user_to_follow = self.get_object()
|
|
83
|
-
if user_to_follow == request.user:
|
|
84
|
-
return Response(
|
|
85
|
-
{"error": "Cannot follow yourself"}, status=status.HTTP_400_BAD_REQUEST
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
follow, created = Follow.objects.get_or_create(
|
|
89
|
-
follower=request.user, following=user_to_follow
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
if created:
|
|
93
|
-
return Response({"status": "following"})
|
|
94
|
-
return Response({"status": "already following"})
|
|
95
|
-
|
|
96
|
-
@action(detail=True, methods=["post"])
|
|
97
|
-
def unfollow(self, request, pk=None):
|
|
98
|
-
"""Unfollow a user."""
|
|
99
|
-
user_to_unfollow = self.get_object()
|
|
100
|
-
Follow.objects.filter(
|
|
101
|
-
follower=request.user, following=user_to_unfollow
|
|
102
|
-
).delete()
|
|
103
|
-
return Response({"status": "unfollowed"})
|
|
104
|
-
|
|
105
|
-
@action(detail=True, methods=["get"])
|
|
106
|
-
def followers(self, request, pk=None):
|
|
107
|
-
"""Get user followers."""
|
|
108
|
-
user = self.get_object()
|
|
109
|
-
followers = Follow.objects.filter(following=user)
|
|
110
|
-
serializer = FollowSerializer(followers, many=True)
|
|
111
|
-
return Response(serializer.data)
|
|
112
|
-
|
|
113
|
-
@action(detail=True, methods=["get"])
|
|
114
|
-
def following(self, request, pk=None):
|
|
115
|
-
"""Get who user is following."""
|
|
116
|
-
user = self.get_object()
|
|
117
|
-
following = Follow.objects.filter(follower=user)
|
|
118
|
-
serializer = FollowSerializer(following, many=True)
|
|
119
|
-
return Response(serializer.data)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
class UserProfileViewSet(viewsets.ModelViewSet):
|
|
123
|
-
"""ViewSet for user profiles."""
|
|
124
|
-
|
|
125
|
-
queryset = UserProfile.objects.all()
|
|
126
|
-
serializer_class = UserProfileSerializer
|
|
127
|
-
permission_classes = [IsAuthenticated]
|
|
128
|
-
|
|
129
|
-
def get_queryset(self):
|
|
130
|
-
"""Filter by user if provided."""
|
|
131
|
-
queryset = UserProfile.objects.all()
|
|
132
|
-
user_id = self.request.query_params.get("user", None)
|
|
133
|
-
if user_id:
|
|
134
|
-
queryset = queryset.filter(user_id=user_id)
|
|
135
|
-
return queryset
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
# AI Context
|
|
2
|
-
|
|
3
|
-
> This file provides a comprehensive overview of the repository for AI coding assistants.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Quick Overview
|
|
8
|
-
|
|
9
|
-
- **Pattern**: MVC (Model-View-Controller)
|
|
10
|
-
- **Languages**: JavaScript, JSON
|
|
11
|
-
- **Frameworks**: Express.js
|
|
12
|
-
- **Total Files**: 8
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Table of Contents
|
|
17
|
-
|
|
18
|
-
1. [Tech Stack](#tech-stack)
|
|
19
|
-
2. [Architecture](#architecture)
|
|
20
|
-
3. [Key Entrypoints](#key-entrypoints)
|
|
21
|
-
4. [Code Conventions](#code-conventions)
|
|
22
|
-
5. [AI Rules](#ai-rules)
|
|
23
|
-
6. [Repository Map](#repository-map)
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Tech Stack
|
|
28
|
-
|
|
29
|
-
**Languages**: JavaScript, JSON
|
|
30
|
-
|
|
31
|
-
**Frameworks**: Express.js
|
|
32
|
-
|
|
33
|
-
**Libraries**: Bcrypt, JWT
|
|
34
|
-
|
|
35
|
-
**Package Managers**: npm
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Architecture
|
|
40
|
-
|
|
41
|
-
## Architectural Pattern
|
|
42
|
-
**Primary**: MVC (Model-View-Controller)
|
|
43
|
-
**Secondary**: Layered Architecture, Microservices
|
|
44
|
-
|
|
45
|
-
## Layers Identified
|
|
46
|
-
- Application
|
|
47
|
-
- Domain
|
|
48
|
-
|
|
49
|
-
## Key Modules
|
|
50
|
-
| Module | Responsibility |
|
|
51
|
-
|--------|----------------|
|
|
52
|
-
| `controllers` | API endpoints and request handling |
|
|
53
|
-
| `index.js` | Contains 0 files |
|
|
54
|
-
| `middleware` | Request/response middleware |
|
|
55
|
-
| `models` | Data models and entities |
|
|
56
|
-
| `package.json` | Contains 0 files |
|
|
57
|
-
| `services` | Business logic and use cases |
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Key Entrypoints
|
|
63
|
-
|
|
64
|
-
### Library
|
|
65
|
-
- `index.js` - Main entry point
|
|
66
|
-
|
|
67
|
-
### Server
|
|
68
|
-
- `package.json#scripts.start` - start: node index.js
|
|
69
|
-
- `package.json#scripts.dev` - dev: nodemon index.js
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Code Conventions
|
|
74
|
-
|
|
75
|
-
## Naming Conventions
|
|
76
|
-
- **Files**: camelCase
|
|
77
|
-
|
|
78
|
-
## Project Structure
|
|
79
|
-
|
|
80
|
-
## Code Style
|
|
81
|
-
- **Semicolons**: Required
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## AI Rules
|
|
87
|
-
|
|
88
|
-
- Language: Use JavaScript, JSON
|
|
89
|
-
- Frameworks: Express.js
|
|
90
|
-
- Architecture: Follow MVC (Model-View-Controller) pattern
|
|
91
|
-
- File naming: camelCase
|
|
92
|
-
- Main entry: package.json#scripts.start
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Repository Map
|
|
97
|
-
|
|
98
|
-
See repo_map.md for the full structure.
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Notes for AI Assistants
|
|
103
|
-
|
|
104
|
-
1. Follow the established naming conventions (see conventions.md)
|
|
105
|
-
2. Use the detected frameworks and libraries
|
|
106
|
-
3. Target the correct entrypoints for modifications
|
|
107
|
-
4. Maintain the detected architecture patterns
|
|
108
|
-
5. Follow AI rules in ai_rules.md
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
*Generated by ai-first*
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# AI Rules
|
|
2
|
-
|
|
3
|
-
> Guidelines for AI assistants working on this project
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Guidelines
|
|
8
|
-
|
|
9
|
-
- Language: Use JavaScript, JSON
|
|
10
|
-
- Frameworks: Express.js
|
|
11
|
-
- Architecture: Follow MVC (Model-View-Controller) pattern
|
|
12
|
-
- File naming: camelCase
|
|
13
|
-
- Main entry: package.json#scripts.start
|
|
14
|
-
- Dev command: npm run dev
|
|
15
|
-
|
|
16
|
-
## Patterns
|
|
17
|
-
|
|
18
|
-
- Layer structure: application → domain
|
|
19
|
-
|
|
20
|
-
## Constraints
|
|
21
|
-
|
|
22
|
-
- Always use semicolons
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Quick Reference
|
|
27
|
-
|
|
28
|
-
| Category | Value |
|
|
29
|
-
|----------|-------|
|
|
30
|
-
| Language | JavaScript, JSON |
|
|
31
|
-
| Framework | Express.js |
|
|
32
|
-
| Architecture | MVC (Model-View-Controller) |
|
|
33
|
-
| Naming | camelCase |
|
|
34
|
-
| Indentation | unknown |
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Best Practices
|
|
39
|
-
|
|
40
|
-
1. Follow the established naming conventions
|
|
41
|
-
2. Keep functions small and focused
|
|
42
|
-
3. Write tests for new features
|
|
43
|
-
4. Use descriptive variable names
|
|
44
|
-
5. Keep the architecture consistent
|
|
45
|
-
6. Document complex logic
|
|
46
|
-
7. Review code before committing
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
*Generated by ai-first*
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Architecture
|
|
2
|
-
|
|
3
|
-
## Architectural Pattern
|
|
4
|
-
**Primary**: MVC (Model-View-Controller)
|
|
5
|
-
**Secondary**: Layered Architecture, Microservices
|
|
6
|
-
|
|
7
|
-
## Layers Identified
|
|
8
|
-
- Application
|
|
9
|
-
- Domain
|
|
10
|
-
|
|
11
|
-
## Key Modules
|
|
12
|
-
| Module | Responsibility |
|
|
13
|
-
|--------|----------------|
|
|
14
|
-
| `controllers` | API endpoints and request handling |
|
|
15
|
-
| `index.js` | Contains 0 files |
|
|
16
|
-
| `middleware` | Request/response middleware |
|
|
17
|
-
| `models` | Data models and entities |
|
|
18
|
-
| `package.json` | Contains 0 files |
|
|
19
|
-
| `services` | Business logic and use cases |
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## Module Details
|
|
23
|
-
|
|
24
|
-
### controllers
|
|
25
|
-
- **Path**: `controllers`
|
|
26
|
-
- **Responsibility**: API endpoints and request handling
|
|
27
|
-
- **Depends on**: service, model
|
|
28
|
-
|
|
29
|
-
### index.js
|
|
30
|
-
- **Path**: `index.js`
|
|
31
|
-
- **Responsibility**: Contains 0 files
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### middleware
|
|
35
|
-
- **Path**: `middleware`
|
|
36
|
-
- **Responsibility**: Request/response middleware
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### models
|
|
40
|
-
- **Path**: `models`
|
|
41
|
-
- **Responsibility**: Data models and entities
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### package.json
|
|
45
|
-
- **Path**: `package.json`
|
|
46
|
-
- **Responsibility**: Contains 0 files
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### services
|
|
50
|
-
- **Path**: `services`
|
|
51
|
-
- **Responsibility**: Business logic and use cases
|
|
52
|
-
- **Depends on**: model, repository
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## Recommendations
|
|
56
|
-
|
|
57
|
-
- Keep the architecture consistent as the project grows
|
|
58
|
-
- Follow the established layer structure
|
|
59
|
-
- Use dependency injection to manage module relationships
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
*Generated by ai-first*
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "controllers",
|
|
3
|
-
"path": "controllers",
|
|
4
|
-
"files": [
|
|
5
|
-
"controllers/authController.js",
|
|
6
|
-
"controllers/userController.js"
|
|
7
|
-
],
|
|
8
|
-
"entrypoints": [
|
|
9
|
-
"controllers/authController.js",
|
|
10
|
-
"controllers/userController.js"
|
|
11
|
-
],
|
|
12
|
-
"dependencies": []
|
|
13
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Code Conventions
|
|
2
|
-
|
|
3
|
-
## Naming Conventions
|
|
4
|
-
- **Files**: camelCase
|
|
5
|
-
|
|
6
|
-
## Project Structure
|
|
7
|
-
|
|
8
|
-
## Code Style
|
|
9
|
-
- **Semicolons**: Required
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Naming Conventions
|
|
13
|
-
|
|
14
|
-
| Element | Convention |
|
|
15
|
-
|---------|------------|
|
|
16
|
-
| Files | camelCase |
|
|
17
|
-
| Components | unknown |
|
|
18
|
-
| Test Files | unknown |
|
|
19
|
-
| Directories | unknown |
|
|
20
|
-
|
|
21
|
-
## Project Structure
|
|
22
|
-
|
|
23
|
-
| Directory | Location |
|
|
24
|
-
|-----------|----------|
|
|
25
|
-
| Source | unknown |
|
|
26
|
-
| Tests | unknown |
|
|
27
|
-
| Config | unknown |
|
|
28
|
-
|
|
29
|
-
## Code Style
|
|
30
|
-
|
|
31
|
-
| Style Element | Value |
|
|
32
|
-
|---------------|-------|
|
|
33
|
-
| Indentation | unknown |
|
|
34
|
-
| Semicolons | Required |
|
|
35
|
-
|
|
36
|
-
## Testing
|
|
37
|
-
|
|
38
|
-
| Aspect | Value |
|
|
39
|
-
|--------|-------|
|
|
40
|
-
| Framework | unknown |
|
|
41
|
-
| Test Pattern | unknown |
|
|
42
|
-
|
|
43
|
-
## Git
|
|
44
|
-
|
|
45
|
-
| Aspect | Value |
|
|
46
|
-
|--------|-------|
|
|
47
|
-
| Branch Strategy | Trunk-based (main/master) |
|
|
48
|
-
| Commit Format | unknown |
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
*Generated by ai-first*
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"totalDependencies": 6,
|
|
3
|
-
"totalModules": 5,
|
|
4
|
-
"dependencies": [
|
|
5
|
-
{
|
|
6
|
-
"source": "controllers/authController.js",
|
|
7
|
-
"target": "services/authService",
|
|
8
|
-
"type": "require"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"source": "controllers/userController.js",
|
|
12
|
-
"target": "services/userService",
|
|
13
|
-
"type": "require"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"source": "index.js",
|
|
17
|
-
"target": "controllers/authController",
|
|
18
|
-
"type": "require"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"source": "index.js",
|
|
22
|
-
"target": "controllers/userController",
|
|
23
|
-
"type": "require"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"source": "services/authService.js",
|
|
27
|
-
"target": "models/userRepository",
|
|
28
|
-
"type": "require"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"source": "services/userService.js",
|
|
32
|
-
"target": "models/userRepository",
|
|
33
|
-
"type": "require"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"byFile": {
|
|
37
|
-
"controllers/authController.js": [
|
|
38
|
-
"services/authService"
|
|
39
|
-
],
|
|
40
|
-
"controllers/userController.js": [
|
|
41
|
-
"services/userService"
|
|
42
|
-
],
|
|
43
|
-
"index.js": [
|
|
44
|
-
"controllers/authController",
|
|
45
|
-
"controllers/userController"
|
|
46
|
-
],
|
|
47
|
-
"services/authService.js": [
|
|
48
|
-
"models/userRepository"
|
|
49
|
-
],
|
|
50
|
-
"services/userService.js": [
|
|
51
|
-
"models/userRepository"
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Entrypoints
|
|
2
|
-
|
|
3
|
-
## Library
|
|
4
|
-
|
|
5
|
-
| Name | Path | Command |
|
|
6
|
-
|------|------|--------|
|
|
7
|
-
| Main | `index.js` | - |
|
|
8
|
-
|
|
9
|
-
## Server
|
|
10
|
-
|
|
11
|
-
| Name | Path | Command |
|
|
12
|
-
|------|------|--------|
|
|
13
|
-
| start | `package.json#scripts.start` | npm run start |
|
|
14
|
-
| dev | `package.json#scripts.dev` | npm run dev |
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
*Generated by ai-first*
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modules": {
|
|
3
|
-
"controllers": {
|
|
4
|
-
"path": "controllers",
|
|
5
|
-
"files": [
|
|
6
|
-
"controllers/authController.js",
|
|
7
|
-
"controllers/userController.js"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"middleware": {
|
|
11
|
-
"path": "middleware",
|
|
12
|
-
"files": [
|
|
13
|
-
"middleware/authMiddleware.js"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"models": {
|
|
17
|
-
"path": "models",
|
|
18
|
-
"files": [
|
|
19
|
-
"models/userRepository.js"
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
"services": {
|
|
23
|
-
"path": "services",
|
|
24
|
-
"files": [
|
|
25
|
-
"services/authService.js",
|
|
26
|
-
"services/userService.js"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "express-api",
|
|
3
|
-
"rootDir": "/mnt/m2/Código/opencode-ai-first/test-projects/express-api",
|
|
4
|
-
"features": [
|
|
5
|
-
"controllers",
|
|
6
|
-
"services"
|
|
7
|
-
],
|
|
8
|
-
"flows": [
|
|
9
|
-
"auth",
|
|
10
|
-
"user"
|
|
11
|
-
],
|
|
12
|
-
"languages": [],
|
|
13
|
-
"frameworks": [],
|
|
14
|
-
"generatedAt": "2026-03-19T01:00:36.366Z"
|
|
15
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"generated": "2026-03-19T01:00:36.355Z",
|
|
3
|
-
"totalFiles": 8,
|
|
4
|
-
"structure": {
|
|
5
|
-
"controllers": {
|
|
6
|
-
"type": "directory",
|
|
7
|
-
"children": {
|
|
8
|
-
"authController.js": {
|
|
9
|
-
"type": "file",
|
|
10
|
-
"extension": "js"
|
|
11
|
-
},
|
|
12
|
-
"userController.js": {
|
|
13
|
-
"type": "file",
|
|
14
|
-
"extension": "js"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"index.js": {
|
|
19
|
-
"type": "file",
|
|
20
|
-
"extension": "js"
|
|
21
|
-
},
|
|
22
|
-
"middleware": {
|
|
23
|
-
"type": "directory",
|
|
24
|
-
"children": {
|
|
25
|
-
"authMiddleware.js": {
|
|
26
|
-
"type": "file",
|
|
27
|
-
"extension": "js"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"models": {
|
|
32
|
-
"type": "directory",
|
|
33
|
-
"children": {
|
|
34
|
-
"userRepository.js": {
|
|
35
|
-
"type": "file",
|
|
36
|
-
"extension": "js"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"package.json": {
|
|
41
|
-
"type": "file",
|
|
42
|
-
"extension": "json"
|
|
43
|
-
},
|
|
44
|
-
"services": {
|
|
45
|
-
"type": "directory",
|
|
46
|
-
"children": {
|
|
47
|
-
"authService.js": {
|
|
48
|
-
"type": "file",
|
|
49
|
-
"extension": "js"
|
|
50
|
-
},
|
|
51
|
-
"userService.js": {
|
|
52
|
-
"type": "file",
|
|
53
|
-
"extension": "js"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"files": [
|
|
59
|
-
{
|
|
60
|
-
"path": "controllers/authController.js",
|
|
61
|
-
"name": "authController.js",
|
|
62
|
-
"extension": "js"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"path": "controllers/userController.js",
|
|
66
|
-
"name": "userController.js",
|
|
67
|
-
"extension": "js"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"path": "index.js",
|
|
71
|
-
"name": "index.js",
|
|
72
|
-
"extension": "js"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"path": "middleware/authMiddleware.js",
|
|
76
|
-
"name": "authMiddleware.js",
|
|
77
|
-
"extension": "js"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"path": "models/userRepository.js",
|
|
81
|
-
"name": "userRepository.js",
|
|
82
|
-
"extension": "js"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"path": "package.json",
|
|
86
|
-
"name": "package.json",
|
|
87
|
-
"extension": "json"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"path": "services/authService.js",
|
|
91
|
-
"name": "authService.js",
|
|
92
|
-
"extension": "js"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"path": "services/userService.js",
|
|
96
|
-
"name": "userService.js",
|
|
97
|
-
"extension": "js"
|
|
98
|
-
}
|
|
99
|
-
]
|
|
100
|
-
}
|