├── tests └── unit │ ├── core │ └── __init__.py │ ├── git │ └── __init__.py │ ├── deployment │ └── __init__.py │ ├── learning │ └── __init__.py │ ├── project │ └── __init__.py │ ├── quality │ ├── __init__.py │ ├── checkers │ │ └── __init__.py │ └── reporters │ │ └── __init__.py │ ├── session │ ├── __init__.py │ └── briefing │ │ └── __init__.py │ ├── testing │ └── __init__.py │ ├── work_items │ └── __init__.py │ ├── visualization │ └── __init__.py │ ├── commands │ ├── __init__.py │ └── test_version.py │ ├── github │ └── __init__.py │ └── init │ └── __init__.py ├── src └── solokit │ ├── templates │ ├── saas_t3 │ │ ├── base │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ ├── server │ │ │ │ ├── api │ │ │ │ │ ├── routers │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── root.ts │ │ │ │ │ └── trpc.ts │ │ │ │ └── db.ts │ │ │ ├── postcss.config.mjs │ │ │ ├── app │ │ │ │ ├── api │ │ │ │ │ ├── health │ │ │ │ │ │ └── route.ts │ │ │ │ │ └── trpc │ │ │ │ │ │ └── [trpc] │ │ │ │ │ │ └── route.ts │ │ │ │ ├── loading.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── error.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── globals.css │ │ │ ├── .env.example │ │ │ ├── components.json │ │ │ ├── lib │ │ │ │ ├── utils.ts │ │ │ │ ├── env.ts │ │ │ │ └── __tests__ │ │ │ │ │ └── utils.test.ts │ │ │ ├── tailwind.config.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ ├── prisma │ │ │ │ └── schema.prisma │ │ │ ├── package.json.template │ │ │ └── next.config.ts │ │ ├── tier-2-standard │ │ │ ├── .husky │ │ │ │ └── pre-commit │ │ │ ├── .lintstagedrc.json │ │ │ ├── .npmrc │ │ │ └── .git-secrets │ │ ├── tier-1-essential │ │ │ ├── jest.setup.ts │ │ │ ├── .prettierrc │ │ │ ├── tests │ │ │ │ └── setup.ts │ │ │ ├── .prettierignore │ │ │ └── jest.config.ts │ │ ├── tier-4-production │ │ │ ├── instrumentation.ts │ │ │ ├── sentry.edge.config.ts │ │ │ ├── sentry.server.config.ts │ │ │ ├── sentry.client.config.ts │ │ │ ├── vercel.json │ │ │ ├── .lighthouserc.json │ │ │ └── .github │ │ │ │ └── workflows │ │ │ │ ├── lighthouse.yml │ │ │ │ └── a11y.yml │ │ ├── tier-3-comprehensive │ │ │ ├── type-coverage.json │ │ │ ├── .jscpd.json │ │ │ ├── stryker.conf.json │ │ │ ├── .axe-config.json │ │ │ └── tests │ │ │ │ ├── integration │ │ │ │ └── api.test.ts │ │ │ │ └── e2e │ │ │ │ └── home.spec.ts │ │ ├── env-templates │ │ │ ├── .editorconfig │ │ │ ├── .env.test.example │ │ │ ├── .env.local.example │ │ │ └── .env.production.example │ │ ├── docker │ │ │ ├── .dockerignore │ │ │ ├── docker-compose.yml │ │ │ └── docker-compose.prod.yml │ │ └── ci-cd │ │ │ └── .github │ │ │ └── workflows │ │ │ └── build.yml │ ├── fullstack_nextjs │ │ ├── base │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ ├── postcss.config.mjs │ │ │ ├── app │ │ │ │ ├── api │ │ │ │ │ └── health │ │ │ │ │ │ ├── route.ts │ │ │ │ │ │ └── __tests__ │ │ │ │ │ │ └── route.test.ts │ │ │ │ ├── loading.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── error.tsx │ │ │ │ ├── globals.css │ │ │ │ ├── __tests__ │ │ │ │ │ └── page.test.tsx │ │ │ │ └── page.tsx │ │ │ ├── .env.example │ │ │ ├── components.json │ │ │ ├── lib │ │ │ │ ├── utils.ts │ │ │ │ ├── prisma.ts │ │ │ │ ├── env.ts │ │ │ │ └── __tests__ │ │ │ │ │ └── utils.test.ts │ │ │ ├── tailwind.config.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ ├── package.json.template │ │ │ ├── prisma │ │ │ │ └── schema.prisma │ │ │ └── next.config.ts │ │ ├── tier-2-standard │ │ │ ├── .husky │ │ │ │ └── pre-commit │ │ │ ├── .lintstagedrc.json │ │ │ ├── .npmrc │ │ │ └── .git-secrets │ │ ├── tier-1-essential │ │ │ ├── jest.setup.ts │ │ │ ├── .prettierrc │ │ │ ├── tests │ │ │ │ └── setup.ts │ │ │ ├── .prettierignore │ │ │ └── jest.config.ts │ │ ├── tier-4-production │ │ │ ├── instrumentation.ts │ │ │ ├── sentry.edge.config.ts │ │ │ ├── sentry.server.config.ts │ │ │ ├── sentry.client.config.ts │ │ │ ├── vercel.json │ │ │ ├── .lighthouserc.json │ │ │ └── .github │ │ │ │ └── workflows │ │ │ │ ├── lighthouse.yml │ │ │ │ └── a11y.yml │ │ ├── tier-3-comprehensive │ │ │ ├── type-coverage.json │ │ │ ├── .jscpd.json │ │ │ ├── tests │ │ │ │ └── integration │ │ │ │ │ └── api.test.ts │ │ │ ├── stryker.conf.json │ │ │ └── .axe-config.json │ │ ├── env-templates │ │ │ ├── .env.test.example │ │ │ ├── .env.local.example │ │ │ ├── .editorconfig │ │ │ └── .env.production.example │ │ ├── docker │ │ │ ├── .dockerignore │ │ │ ├── docker-compose.yml │ │ │ └── docker-compose.prod.yml │ │ └── ci-cd │ │ │ └── .github │ │ │ └── workflows │ │ │ └── build.yml │ ├── ml_ai_fastapi │ │ ├── base │ │ │ ├── .python-version │ │ │ ├── alembic │ │ │ │ └── versions │ │ │ │ │ └── .gitkeep │ │ │ ├── src │ │ │ │ ├── api │ │ │ │ │ ├── routes │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── health.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── dependencies.py │ │ │ │ ├── services │ │ │ │ │ └── __init__.py │ │ │ │ ├── core │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── database.py │ │ │ │ ├── __init__.py.template │ │ │ │ └── models │ │ │ │ │ └── __init__.py │ │ │ ├── requirements.txt.template │ │ │ ├── .env.example.template │ │ │ └── .gitignore │ │ ├── tier-1-essential │ │ │ ├── tests │ │ │ │ ├── unit │ │ │ │ │ └── __init__.py │ │ │ │ └── __init__.py.template │ │ │ ├── requirements-dev.txt.template │ │ │ ├── .coveragerc │ │ │ └── pyrightconfig.json │ │ ├── tier-3-comprehensive │ │ │ ├── tests │ │ │ │ └── integration │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_api.py │ │ │ ├── .pylintrc │ │ │ ├── .radon.cfg │ │ │ ├── .vulture │ │ │ └── .coveragerc.template │ │ ├── tier-4-production │ │ │ ├── src │ │ │ │ ├── middleware │ │ │ │ │ └── __init__.py │ │ │ │ ├── api │ │ │ │ │ └── routes │ │ │ │ │ │ └── metrics.py │ │ │ │ └── core │ │ │ │ │ └── monitoring.py │ │ │ └── requirements-prod.txt.template │ │ ├── tier-2-standard │ │ │ ├── .bandit │ │ │ └── .pre-commit-config.yaml │ │ ├── env-templates │ │ │ ├── .editorconfig │ │ │ ├── .env.local.example.template │ │ │ └── .env.test.example.template │ │ └── docker │ │ │ ├── .dockerignore │ │ │ └── Dockerfile │ ├── dashboard_refine │ │ ├── tier-2-standard │ │ │ ├── .husky │ │ │ │ └── pre-commit │ │ │ ├── .lintstagedrc.json │ │ │ ├── .npmrc │ │ │ └── .git-secrets │ │ ├── tier-1-essential │ │ │ ├── jest.setup.ts │ │ │ ├── .prettierrc │ │ │ ├── tests │ │ │ │ └── setup.ts │ │ │ ├── .prettierignore │ │ │ └── jest.config.ts │ │ ├── base │ │ │ ├── .env.example │ │ │ ├── postcss.config.mjs │ │ │ ├── app │ │ │ │ ├── api │ │ │ │ │ └── health │ │ │ │ │ │ └── route.ts │ │ │ │ ├── loading.tsx │ │ │ │ ├── (dashboard) │ │ │ │ │ └── layout.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── error.tsx │ │ │ │ └── __tests__ │ │ │ │ │ └── loading.test.tsx │ │ │ ├── components.json │ │ │ ├── lib │ │ │ │ ├── utils.ts │ │ │ │ └── __tests__ │ │ │ │ │ └── utils.test.ts │ │ │ ├── .gitignore │ │ │ ├── tailwind.config.ts │ │ │ ├── providers │ │ │ │ └── refine-provider.tsx │ │ │ ├── tsconfig.json │ │ │ ├── components │ │ │ │ └── client-refine-wrapper.tsx │ │ │ ├── package.json.template │ │ │ └── next.config.ts │ │ ├── tier-4-production │ │ │ ├── instrumentation.ts │ │ │ ├── sentry.edge.config.ts │ │ │ ├── sentry.server.config.ts │ │ │ ├── vercel.json │ │ │ ├── sentry.client.config.ts │ │ │ ├── .lighthouserc.json │ │ │ └── .github │ │ │ │ └── workflows │ │ │ │ ├── lighthouse.yml │ │ │ │ └── a11y.yml │ │ ├── tier-3-comprehensive │ │ │ ├── type-coverage.json │ │ │ ├── .jscpd.json │ │ │ ├── tests │ │ │ │ └── integration │ │ │ │ │ └── api.test.ts │ │ │ ├── stryker.conf.json │ │ │ └── .axe-config.json │ │ ├── docker │ │ │ ├── docker-compose.yml │ │ │ ├── docker-compose.prod.yml │ │ │ └── .dockerignore │ │ ├── env-templates │ │ │ ├── .env.test.example │ │ │ ├── .env.local.example │ │ │ ├── .editorconfig │ │ │ └── .env.production.example │ │ └── ci-cd │ │ │ └── .github │ │ │ └── workflows │ │ │ └── build.yml │ ├── __init__.py │ ├── status_update.json │ ├── work_items.json │ ├── learnings.json │ ├── CHANGELOG.md │ ├── git-hooks │ │ └── prepare-commit-msg │ └── .claude │ │ └── commands │ │ ├── status.md │ │ ├── work-show.md │ │ ├── work-list.md │ │ ├── validate.md │ │ ├── work-next.md │ │ ├── work-delete.md │ │ └── learn-search.md │ ├── deployment │ └── __init__.py │ ├── session │ ├── __init__.py │ └── briefing │ │ ├── stack_detector.py │ │ └── tree_generator.py │ ├── git │ └── __init__.py │ ├── quality │ ├── __init__.py │ ├── reporters │ │ ├── __init__.py │ │ ├── base.py │ │ └── json_reporter.py │ └── checkers │ │ └── __init__.py │ ├── visualization │ └── __init__.py │ ├── __version__.py │ ├── learning │ └── __init__.py │ ├── work_items │ └── __init__.py │ ├── project │ └── __init__.py │ ├── testing │ └── __init__.py │ ├── core │ ├── __init__.py │ └── argparse_helpers.py │ ├── github │ └── __init__.py │ ├── commands │ ├── __init__.py │ └── version.py │ ├── __init__.py │ ├── adopt │ └── __init__.py │ └── init │ └── __init__.py ├── .codecov.yml ├── .editorconfig ├── .gitmessage ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── publish-pypi.yml │ └── pre-commit.yml ├── docs └── development │ └── NOTES.md ├── .claude └── commands │ ├── status.md │ ├── work-show.md │ ├── work-list.md │ ├── validate.md │ ├── work-next.md │ ├── work-delete.md │ ├── learn-search.md │ └── learn-show.md ├── .pydocstyle ├── .gitignore ├── LICENSE └── Makefile /tests/unit/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/git/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/deployment/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/learning/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/project/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/quality/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/session/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/testing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/work_items/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/visualization/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/quality/checkers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/quality/reporters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/session/briefing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/server/api/routers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/.python-version: -------------------------------------------------------------------------------- 1 | 3.11 2 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/alembic/versions/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/commands/__init__.py: -------------------------------------------------------------------------------- 1 | """Unit tests for command modules.""" 2 | -------------------------------------------------------------------------------- /tests/unit/github/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for GitHub integration module.""" 2 | -------------------------------------------------------------------------------- /src/solokit/deployment/__init__.py: -------------------------------------------------------------------------------- 1 | """Deployment execution and management.""" 2 | -------------------------------------------------------------------------------- /src/solokit/session/__init__.py: -------------------------------------------------------------------------------- 1 | """Session management for Solokit workflow.""" 2 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-2-standard/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /tests/unit/init/__init__.py: -------------------------------------------------------------------------------- 1 | """Unit tests for Solokit initialization system.""" 2 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-2-standard/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-2-standard/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /src/solokit/git/__init__.py: -------------------------------------------------------------------------------- 1 | """Git integration for branch management and status tracking.""" 2 | -------------------------------------------------------------------------------- /src/solokit/quality/__init__.py: -------------------------------------------------------------------------------- 1 | """Quality gates, validation, and testing infrastructure.""" 2 | -------------------------------------------------------------------------------- /src/solokit/visualization/__init__.py: -------------------------------------------------------------------------------- 1 | """Visualization tools including dependency graphs.""" 2 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-1-essential/jest.setup.ts: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom"; 2 | -------------------------------------------------------------------------------- /src/solokit/__version__.py: -------------------------------------------------------------------------------- 1 | """Version information for Solokit package.""" 2 | 3 | __version__ = "0.2.2" 4 | -------------------------------------------------------------------------------- /src/solokit/learning/__init__.py: -------------------------------------------------------------------------------- 1 | """Learning system for capturing and curating development insights.""" 2 | -------------------------------------------------------------------------------- /src/solokit/templates/__init__.py: -------------------------------------------------------------------------------- 1 | """Templates for work item specs, configuration, and test setup.""" 2 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/api/routes/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | API routes package 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-1-essential/jest.setup.ts: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom"; 2 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-1-essential/jest.setup.ts: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom"; 2 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/services/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Business logic services package 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-1-essential/tests/unit/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Unit tests package 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/work_items/__init__.py: -------------------------------------------------------------------------------- 1 | """Work item management including specs, validation, and CRUD operations.""" 2 | -------------------------------------------------------------------------------- /src/solokit/project/__init__.py: -------------------------------------------------------------------------------- 1 | """Project management including initialization, stack generation, and plugin sync.""" 2 | -------------------------------------------------------------------------------- /src/solokit/testing/__init__.py: -------------------------------------------------------------------------------- 1 | """Testing utilities including integration test runner and performance benchmarks.""" 2 | -------------------------------------------------------------------------------- /src/solokit/core/__init__.py: -------------------------------------------------------------------------------- 1 | """Core functionality for Solokit including file operations, logging, and configuration.""" 2 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/api/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | API package - contains all API routes and endpoints 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-1-essential/tests/__init__.py.template: -------------------------------------------------------------------------------- 1 | """ 2 | Test suite for {project_name} 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-3-comprehensive/tests/integration/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Integration tests package 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/core/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Core package - contains configuration, database, and utilities 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-4-production/src/middleware/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Middleware package for request/response processing 3 | """ 4 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/__init__.py.template: -------------------------------------------------------------------------------- 1 | """ 2 | {project_name} - FastAPI ML/AI Application 3 | """ 4 | 5 | __version__ = "0.1.0" 6 | -------------------------------------------------------------------------------- /src/solokit/templates/status_update.json: -------------------------------------------------------------------------------- 1 | { 2 | "current_session": null, 3 | "current_work_item": null, 4 | "started_at": null, 5 | "status": "idle" 6 | } 7 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-2-standard/.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"], 3 | "*.{json,md,css}": ["prettier --write"] 4 | } 5 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/.env.example: -------------------------------------------------------------------------------- 1 | # API Configuration 2 | # URL for the backend API that Refine will connect to 3 | NEXT_PUBLIC_API_URL=https://api.fake-rest.refine.dev 4 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-2-standard/.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"], 3 | "*.{json,md,css}": ["prettier --write"] 4 | } 5 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-2-standard/.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"], 3 | "*.{json,md,css}": ["prettier --write"] 4 | } 5 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-2-standard/.npmrc: -------------------------------------------------------------------------------- 1 | # Security settings 2 | audit-level=moderate 3 | fund=false 4 | save-exact=true 5 | 6 | # Performance 7 | prefer-offline=true 8 | progress=false 9 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-2-standard/.npmrc: -------------------------------------------------------------------------------- 1 | # Security settings 2 | audit-level=moderate 3 | fund=false 4 | save-exact=true 5 | 6 | # Performance 7 | prefer-offline=true 8 | progress=false 9 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-2-standard/.npmrc: -------------------------------------------------------------------------------- 1 | # Security settings 2 | audit-level=moderate 3 | fund=false 4 | save-exact=true 5 | 6 | # Performance 7 | prefer-offline=true 8 | progress=false 9 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-1-essential/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": false, 5 | "printWidth": 100, 6 | "tabWidth": 2, 7 | "useTabs": false 8 | } 9 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-1-essential/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": false, 5 | "printWidth": 100, 6 | "tabWidth": 2, 7 | "useTabs": false 8 | } 9 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-1-essential/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": false, 5 | "printWidth": 100, 6 | "tabWidth": 2, 7 | "useTabs": false 8 | } 9 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | "@tailwindcss/postcss": {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | "@tailwindcss/postcss": {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | "@tailwindcss/postcss": {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/api/health/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse } from "next/server"; 2 | 3 | export async function GET() { 4 | return NextResponse.json({ 5 | status: "healthy", 6 | timestamp: new Date().toISOString(), 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /src/solokit/templates/work_items.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "total_items": 0, 4 | "completed": 0, 5 | "in_progress": 0, 6 | "blocked": 0, 7 | "last_updated": null 8 | }, 9 | "milestones": {}, 10 | "work_items": {} 11 | } 12 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/app/api/health/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse } from "next/server"; 2 | 3 | export async function GET() { 4 | return NextResponse.json({ 5 | status: "healthy", 6 | timestamp: new Date().toISOString(), 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/api/health/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse } from "next/server"; 2 | 3 | export async function GET() { 4 | return NextResponse.json({ 5 | status: "healthy", 6 | timestamp: new Date().toISOString(), 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/.env.example: -------------------------------------------------------------------------------- 1 | # Database 2 | # PostgreSQL connection string 3 | DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public" 4 | 5 | # Optional: Add your environment-specific variables below 6 | # NODE_ENV="development" 7 | -------------------------------------------------------------------------------- /src/solokit/github/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | GitHub integration module for Solokit. 3 | 4 | Provides functionality for setting up GitHub repositories after project initialization. 5 | """ 6 | 7 | from solokit.github.setup import GitHubSetup 8 | 9 | __all__ = ["GitHubSetup"] 10 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/models/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | SQLModel models package 3 | 4 | Add your models here. Example: 5 | 6 | from src.models.user import User, UserCreate, UserRead, UserUpdate 7 | 8 | __all__ = ["User", "UserCreate", "UserRead", "UserUpdate"] 9 | """ 10 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register() { 2 | if (process.env.NEXT_RUNTIME === "nodejs") { 3 | await import("./sentry.server.config"); 4 | } 5 | 6 | if (process.env.NEXT_RUNTIME === "edge") { 7 | await import("./sentry.edge.config"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: auto 6 | threshold: 1% 7 | patch: 8 | default: 9 | target: auto 10 | threshold: 1% 11 | 12 | comment: 13 | layout: "header, diff, flags, files" 14 | behavior: default 15 | require_changes: false 16 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register() { 2 | if (process.env.NEXT_RUNTIME === "nodejs") { 3 | await import("./sentry.server.config"); 4 | } 5 | 6 | if (process.env.NEXT_RUNTIME === "edge") { 7 | await import("./sentry.edge.config"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register() { 2 | if (process.env.NEXT_RUNTIME === "nodejs") { 3 | await import("./sentry.server.config"); 4 | } 5 | 6 | if (process.env.NEXT_RUNTIME === "edge") { 7 | await import("./sentry.edge.config"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/solokit/commands/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Solokit Commands Module 3 | 4 | This module contains utility commands for the Solokit CLI including: 5 | - help: Display command help and usage information 6 | - version: Show version and system information 7 | - doctor: Run system diagnostics 8 | - config: Display and validate configuration 9 | """ 10 | -------------------------------------------------------------------------------- /src/solokit/templates/learnings.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "total_learnings": 0, 4 | "last_curated": null 5 | }, 6 | "categories": { 7 | "architecture_patterns": [], 8 | "gotchas": [], 9 | "best_practices": [], 10 | "technical_debt": [], 11 | "performance": [], 12 | "security": [] 13 | }, 14 | "learnings": [] 15 | } 16 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-2-standard/.bandit: -------------------------------------------------------------------------------- 1 | # Bandit security linter configuration (YAML format) 2 | # https://bandit.readthedocs.io/ 3 | 4 | exclude_dirs: 5 | - /tests 6 | - /.venv 7 | - /venv 8 | - /alembic/versions 9 | 10 | skips: 11 | - B101 # assert_used - we use asserts in tests 12 | - B601 # paramiko_calls - not applicable 13 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-3-comprehensive/type-coverage.json: -------------------------------------------------------------------------------- 1 | { 2 | "atLeast": 95, 3 | "cache": true, 4 | "ignoreCatch": true, 5 | "ignoreFiles": [ 6 | "**/*.test.ts", 7 | "**/*.test.tsx", 8 | "**/*.spec.ts", 9 | "**/*.spec.tsx", 10 | "node_modules/**", 11 | ".next/**", 12 | "coverage/**", 13 | "dist/**", 14 | "build/**" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-3-comprehensive/type-coverage.json: -------------------------------------------------------------------------------- 1 | { 2 | "atLeast": 95, 3 | "cache": true, 4 | "ignoreCatch": true, 5 | "ignoreFiles": [ 6 | "**/*.test.ts", 7 | "**/*.test.tsx", 8 | "**/*.spec.ts", 9 | "**/*.spec.tsx", 10 | "node_modules/**", 11 | ".next/**", 12 | "coverage/**", 13 | "dist/**", 14 | "build/**" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-3-comprehensive/type-coverage.json: -------------------------------------------------------------------------------- 1 | { 2 | "atLeast": 95, 3 | "cache": true, 4 | "ignoreCatch": true, 5 | "ignoreFiles": [ 6 | "**/*.test.ts", 7 | "**/*.test.tsx", 8 | "**/*.spec.ts", 9 | "**/*.spec.tsx", 10 | "node_modules/**", 11 | ".next/**", 12 | "coverage/**", 13 | "dist/**", 14 | "build/**" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/solokit/quality/reporters/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Quality gate reporters.""" 3 | 4 | from __future__ import annotations 5 | 6 | from solokit.quality.reporters.base import Reporter 7 | from solokit.quality.reporters.console import ConsoleReporter 8 | from solokit.quality.reporters.json_reporter import JSONReporter 9 | 10 | __all__ = ["Reporter", "ConsoleReporter", "JSONReporter"] 11 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-1-essential/requirements-dev.txt.template: -------------------------------------------------------------------------------- 1 | # Development Dependencies for {project_name} 2 | 3 | # Testing 4 | pytest==8.3.4 5 | pytest-cov==6.0.0 6 | pytest-asyncio==0.25.2 7 | httpx==0.28.1 8 | aiosqlite==0.20.0 9 | 10 | # Linting & Formatting 11 | ruff==0.9.2 12 | 13 | # Type Checking 14 | pyright==1.1.407 15 | 16 | # Database (async support for testing) 17 | asyncpg==0.30.0 18 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/.env.example: -------------------------------------------------------------------------------- 1 | # Database 2 | # PostgreSQL connection string 3 | DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public" 4 | 5 | # Next Auth 6 | # Generate a secret: `openssl rand -base64 32` 7 | NEXTAUTH_SECRET="your-secret-here" 8 | NEXTAUTH_URL="http://localhost:3000" 9 | 10 | # Optional: Add your environment-specific variables below 11 | # NODE_ENV="development" 12 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | }); 12 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | }); 12 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | }); 12 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | }); 12 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | }); 12 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | }); 12 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-3-comprehensive/.pylintrc: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | jobs=1 3 | 4 | [SIMILARITIES] 5 | min-similarity-lines=4 6 | ignore-comments=yes 7 | ignore-docstrings=yes 8 | ignore-imports=yes 9 | ignore-signatures=yes 10 | 11 | [MESSAGES CONTROL] 12 | # Only enable duplicate-code check for this config 13 | disable=all 14 | enable=duplicate-code 15 | 16 | [REPORTS] 17 | output-format=text 18 | reports=no 19 | score=no 20 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": false 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/solokit/__init__.py: -------------------------------------------------------------------------------- 1 | """Session-Driven Development (Solokit) - AI-Augmented Development Workflow System. 2 | 3 | Solokit is a structured workflow system for AI-augmented software development that organizes 4 | work into discrete sessions, each focused on completing a single work item with 5 | comprehensive context, quality gates, and learning capture. 6 | """ 7 | 8 | from solokit.__version__ import __version__ 9 | 10 | __all__ = ["__version__"] 11 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": false 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | /** 5 | * Utility function to merge Tailwind CSS classes 6 | * 7 | * @example 8 | * cn("px-2 py-1", "bg-blue-500") // "px-2 py-1 bg-blue-500" 9 | * cn("px-2", condition && "py-1") // "px-2 py-1" or "px-2" 10 | */ 11 | export function cn(...inputs: ClassValue[]) { 12 | return twMerge(clsx(inputs)); 13 | } 14 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-3-comprehensive/.radon.cfg: -------------------------------------------------------------------------------- 1 | # Radon complexity analysis configuration 2 | # https://radon.readthedocs.io/ 3 | 4 | [radon] 5 | # Cyclomatic Complexity thresholds 6 | cc_min = B 7 | cc_max = F 8 | 9 | # Maintainability Index thresholds 10 | mi_min = A 11 | mi_max = C 12 | 13 | # Exclude patterns 14 | exclude = *test*.py,*/__pycache__/*,.venv/*,venv/*,alembic/versions/* 15 | 16 | # Output format 17 | output_format = text 18 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | /** 5 | * Utility function to merge Tailwind CSS classes 6 | * 7 | * @example 8 | * cn("px-2 py-1", "bg-blue-500") // "px-2 py-1 bg-blue-500" 9 | * cn("px-2", condition && "py-1") // "px-2 py-1" or "px-2" 10 | */ 11 | export function cn(...inputs: ClassValue[]) { 12 | return twMerge(clsx(inputs)); 13 | } 14 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | /** 5 | * Utility function to merge Tailwind CSS classes 6 | * 7 | * @example 8 | * cn("px-2 py-1", "bg-blue-500") // "px-2 py-1 bg-blue-500" 9 | * cn("px-2", condition && "py-1") // "px-2 py-1" or "px-2" 10 | */ 11 | export function cn(...inputs: ClassValue[]) { 12 | return twMerge(clsx(inputs)); 13 | } 14 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/app/loading.tsx: -------------------------------------------------------------------------------- 1 | export default function Loading() { 2 | return ( 3 |
4 |
5 |
6 |

Loading...

7 |
8 |
9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-3-comprehensive/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "ignore": [ 5 | "node_modules/**", 6 | ".next/**", 7 | "coverage/**", 8 | "dist/**", 9 | "build/**", 10 | "**/*.test.ts", 11 | "**/*.test.tsx", 12 | "**/*.spec.ts", 13 | "**/*.spec.tsx" 14 | ], 15 | "format": ["typescript", "javascript", "tsx", "jsx"], 16 | "minLines": 5, 17 | "minTokens": 50 18 | } 19 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/loading.tsx: -------------------------------------------------------------------------------- 1 | export default function Loading() { 2 | return ( 3 |
4 |
5 |
6 |

Loading...

7 |
8 |
9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /src/solokit/templates/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased] 9 | 10 | ### Added 11 | 12 | - Initial project setup with Session-Driven Development 13 | 14 | ### Changed 15 | 16 | ### Fixed 17 | 18 | ### Removed 19 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-3-comprehensive/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "ignore": [ 5 | "node_modules/**", 6 | ".next/**", 7 | "coverage/**", 8 | "dist/**", 9 | "build/**", 10 | "**/*.test.ts", 11 | "**/*.test.tsx", 12 | "**/*.spec.ts", 13 | "**/*.spec.tsx" 14 | ], 15 | "format": ["typescript", "javascript", "tsx", "jsx"], 16 | "minLines": 5, 17 | "minTokens": 50 18 | } 19 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-3-comprehensive/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "ignore": [ 5 | "node_modules/**", 6 | ".next/**", 7 | "coverage/**", 8 | "dist/**", 9 | "build/**", 10 | "**/*.test.ts", 11 | "**/*.test.tsx", 12 | "**/*.spec.ts", 13 | "**/*.spec.tsx" 14 | ], 15 | "format": ["typescript", "javascript", "tsx", "jsx"], 16 | "minLines": 5, 17 | "minTokens": 50 18 | } 19 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/loading.tsx: -------------------------------------------------------------------------------- 1 | export default function Loading() { 2 | return ( 3 |
4 |
5 |
6 |

Loading...

7 |
8 |
9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-4-production/src/api/routes/metrics.py: -------------------------------------------------------------------------------- 1 | """ 2 | Prometheus metrics endpoint 3 | """ 4 | 5 | from fastapi import APIRouter, Response 6 | 7 | from src.core.monitoring import get_metrics 8 | 9 | router = APIRouter() 10 | 11 | 12 | @router.get("/metrics") 13 | async def metrics() -> Response: 14 | """ 15 | Prometheus metrics endpoint. 16 | 17 | Returns: 18 | Response: Prometheus metrics in text format 19 | """ 20 | return get_metrics() 21 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-1-essential/tests/setup.ts: -------------------------------------------------------------------------------- 1 | // Add custom jest matchers from jest-dom 2 | import "@testing-library/jest-dom"; 3 | 4 | // Mock Next.js router 5 | jest.mock("next/navigation", () => ({ 6 | useRouter() { 7 | return { 8 | push: jest.fn(), 9 | replace: jest.fn(), 10 | prefetch: jest.fn(), 11 | }; 12 | }, 13 | useSearchParams() { 14 | return new URLSearchParams(); 15 | }, 16 | usePathname() { 17 | return ""; 18 | }, 19 | })); 20 | 21 | // Mock environment variables 22 | process.env.NEXT_PUBLIC_APP_URL = "http://localhost:3000"; 23 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-1-essential/tests/setup.ts: -------------------------------------------------------------------------------- 1 | // Add custom jest matchers from jest-dom 2 | import "@testing-library/jest-dom"; 3 | 4 | // Mock Next.js router 5 | jest.mock("next/navigation", () => ({ 6 | useRouter() { 7 | return { 8 | push: jest.fn(), 9 | replace: jest.fn(), 10 | prefetch: jest.fn(), 11 | }; 12 | }, 13 | useSearchParams() { 14 | return new URLSearchParams(); 15 | }, 16 | usePathname() { 17 | return ""; 18 | }, 19 | })); 20 | 21 | // Mock environment variables 22 | process.env.NEXT_PUBLIC_APP_URL = "http://localhost:3000"; 23 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import type { ReactNode } from "react"; 3 | import "./globals.css"; 4 | 5 | export const metadata: Metadata = { 6 | title: "Full-Stack Next.js App", 7 | description: "A simple full-stack Next.js application with Prisma and Zod", 8 | icons: [{ rel: "icon", url: "/favicon.ico" }], 9 | }; 10 | 11 | export default function RootLayout({ 12 | children, 13 | }: Readonly<{ 14 | children: ReactNode; 15 | }>) { 16 | return ( 17 | 18 | {children} 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps maintain consistent coding styles 2 | # https://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.{py,pyi}] 13 | indent_style = space 14 | indent_size = 4 15 | max_line_length = 88 16 | 17 | [*.{js,ts,jsx,tsx,json,yaml,yml}] 18 | indent_style = space 19 | indent_size = 2 20 | 21 | [*.md] 22 | trim_trailing_whitespace = false 23 | max_line_length = off 24 | 25 | [Makefile] 26 | indent_style = tab 27 | 28 | [*.{sh,bash}] 29 | indent_style = space 30 | indent_size = 2 31 | -------------------------------------------------------------------------------- /.gitmessage: -------------------------------------------------------------------------------- 1 | # : (max 50 characters) 2 | 3 | # (wrap at 72 characters) 4 | 5 | 6 | # Optional learning (will be auto-extracted during /sk:end): 7 | # LEARNING: 8 | # 9 | # Examples: 10 | # LEARNING: TypeScript number type handles both integers and decimals seamlessly 11 | # LEARNING: FastAPI middleware order matters for CORS - add_middleware calls must be in reverse order 12 | # LEARNING: Always use parameterized queries to prevent SQL injection 13 | 14 | 15 | # 🤖 Generated with [Claude Code](https://claude.com/claude-code) 16 | # 17 | # Co-Authored-By: Claude 18 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | /** 4 | * Tailwind CSS v4 Configuration 5 | * 6 | * In Tailwind v4, most configuration is done in CSS via @theme blocks. 7 | * This file is only needed for: 8 | * - Plugins 9 | * - Content paths (if automatic detection doesn't work) 10 | * 11 | * Theme customization (colors, spacing, etc.) should be done in globals.css 12 | * using the @theme directive. 13 | * 14 | * @see https://tailwindcss.com/docs/upgrade-guide 15 | */ 16 | const config: Config = { 17 | plugins: [], 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | # Next.js application (development) 5 | app: 6 | build: 7 | context: .. 8 | dockerfile: docker/Dockerfile 9 | target: builder 10 | container_name: dashboard-refine-app 11 | restart: unless-stopped 12 | environment: 13 | - NODE_ENV=development 14 | - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-https://api.fake-rest.refine.dev} 15 | ports: 16 | - '3000:3000' 17 | volumes: 18 | - ..:/app 19 | - /app/node_modules 20 | - /app/.next 21 | command: npm run dev 22 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | /** 4 | * Tailwind CSS v4 Configuration 5 | * 6 | * In Tailwind v4, most configuration is done in CSS via @theme blocks. 7 | * This file is only needed for: 8 | * - Plugins 9 | * - Content paths (if automatic detection doesn't work) 10 | * 11 | * Theme customization (colors, spacing, etc.) should be done in globals.css 12 | * using the @theme directive. 13 | * 14 | * @see https://tailwindcss.com/docs/upgrade-guide 15 | */ 16 | const config: Config = { 17 | plugins: [], 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/api/dependencies.py: -------------------------------------------------------------------------------- 1 | """ 2 | FastAPI dependency injection - provides shared dependencies like database sessions 3 | """ 4 | 5 | from collections.abc import AsyncGenerator 6 | 7 | from sqlmodel.ext.asyncio.session import AsyncSession 8 | 9 | from src.core.database import async_session_maker 10 | 11 | 12 | async def get_db() -> AsyncGenerator[AsyncSession, None]: 13 | """ 14 | Dependency that provides a database session. 15 | 16 | Yields: 17 | AsyncSession: Database session 18 | """ 19 | async with async_session_maker() as session: 20 | yield session 21 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/app/(dashboard)/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Header } from "@/components/layout/header"; 2 | import { Sidebar } from "@/components/layout/sidebar"; 3 | 4 | /** 5 | * Dashboard layout 6 | * Provides consistent header and sidebar for all dashboard pages 7 | */ 8 | export default function DashboardLayout({ children }: { children: React.ReactNode }) { 9 | return ( 10 |
11 |
12 |
13 | 14 |
{children}
15 |
16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | 38 | # solokit session tracking 39 | .session/ 40 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | 38 | # solokit session tracking 39 | .session/ 40 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | /** 4 | * Tailwind CSS v4 Configuration 5 | * 6 | * In Tailwind v4, most configuration is done in CSS via @theme blocks. 7 | * This file is only needed for: 8 | * - Plugins 9 | * - Content paths (if automatic detection doesn't work) 10 | * 11 | * Theme customization (colors, spacing, radius) is done in globals.css 12 | * using the @theme directive for shadcn/ui compatibility. 13 | * 14 | * @see https://tailwindcss.com/docs/upgrade-guide 15 | */ 16 | const config: Config = { 17 | plugins: [], 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | 38 | # solokit session tracking 39 | .session/ 40 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/env-templates/.env.test.example: -------------------------------------------------------------------------------- 1 | # Environment: Test 2 | # Copy this file to .env.test and fill in your values 3 | 4 | # API Configuration (Refine.dev) 5 | NEXT_PUBLIC_API_URL="https://api.fake-rest.refine.dev" 6 | 7 | # Test environment flags 8 | NODE_ENV="test" 9 | NEXT_PUBLIC_APP_URL="http://localhost:3000" 10 | 11 | # Disable telemetry in tests 12 | NEXT_TELEMETRY_DISABLED=1 13 | 14 | # Optional: Enable test logging 15 | # LOG_LEVEL="error" 16 | 17 | # Optional: Mock external services (recommended) 18 | MOCK_EXTERNAL_SERVICES=true 19 | 20 | # Optional: Test timeout settings 21 | # JEST_TIMEOUT=10000 22 | # PLAYWRIGHT_TIMEOUT=30000 23 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import type { ReactNode } from "react"; 3 | import { TRPCReactProvider } from "@/lib/api"; 4 | import "./globals.css"; 5 | 6 | export const metadata: Metadata = { 7 | title: "Create T3 App", 8 | description: "Generated by create-t3-app", 9 | icons: [{ rel: "icon", url: "/favicon.ico" }], 10 | }; 11 | 12 | export default function RootLayout({ 13 | children, 14 | }: Readonly<{ 15 | children: ReactNode; 16 | }>) { 17 | return ( 18 | 19 | 20 | {children} 21 | 22 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report a bug or unexpected behavior 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /docs/development/NOTES.md: -------------------------------------------------------------------------------- 1 | # Development Notes 2 | 3 | This file is a placeholder for personal notes during development. 4 | 5 | Use this space to: 6 | - Document temporary observations or hypotheses 7 | - Track debugging insights during active development 8 | - Keep quick reminders for ongoing work 9 | - Note down ideas for future improvements 10 | 11 | These notes are meant to be temporary and personal. For permanent documentation: 12 | - **Project decisions** → `docs/architecture/DECISIONS.md` 13 | - **Implementation details** → `docs/development/IMPLEMENTATION.md` 14 | - **Known issues** → GitHub Issues 15 | - **Session learnings** → `.session/learnings/` (captured via `/learn` command) 16 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-4-production/requirements-prod.txt.template: -------------------------------------------------------------------------------- 1 | # Production Dependencies for {project_name} 2 | 3 | # Monitoring & Metrics 4 | prometheus-client==0.23.1 5 | statsd==4.0.1 6 | 7 | # Structured Logging 8 | structlog==25.5.0 9 | python-json-logger==4.0.0 10 | 11 | # Health Checks 12 | fastapi-health==0.4.0 13 | 14 | # Error Tracking 15 | sentry-sdk==2.27.0 16 | 17 | # OpenTelemetry (optional - may conflict with semgrep) 18 | opentelemetry-api==1.38.0 19 | opentelemetry-sdk==1.38.0 20 | opentelemetry-instrumentation==0.59b0 21 | opentelemetry-instrumentation-fastapi==0.59b0 22 | opentelemetry-exporter-otlp==1.38.0 23 | 24 | # Performance 25 | gunicorn==23.0.0 26 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import type { ReactNode } from "react"; 3 | import ClientRefineWrapper from "@/components/client-refine-wrapper"; 4 | import "./globals.css"; 5 | 6 | export const metadata: Metadata = { 7 | title: "Dashboard - Refine Admin", 8 | description: "Modern admin dashboard built with Refine and Next.js", 9 | }; 10 | 11 | export default function RootLayout({ 12 | children, 13 | }: Readonly<{ 14 | children: ReactNode; 15 | }>) { 16 | return ( 17 | 18 | 19 | {children} 20 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-1-essential/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | source = src 3 | omit = 4 | tests/* 5 | alembic/* 6 | */__init__.py 7 | # Tier 4 Production modules (optional features) 8 | src/api/routes/metrics.py 9 | src/core/logging.py 10 | src/core/monitoring.py 11 | src/core/sentry.py 12 | src/middleware/logging.py 13 | src/middleware/tracing.py 14 | 15 | [report] 16 | precision = 2 17 | show_missing = True 18 | skip_covered = False 19 | exclude_lines = 20 | pragma: no cover 21 | def __repr__ 22 | raise AssertionError 23 | raise NotImplementedError 24 | if __name__ == .__main__.: 25 | if TYPE_CHECKING: 26 | @abstractmethod 27 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/env-templates/.env.test.example: -------------------------------------------------------------------------------- 1 | # Environment: Test 2 | # Copy this file to .env.test and fill in your values 3 | 4 | # Database (use a separate test database) 5 | DATABASE_URL="postgresql://postgres:postgres@localhost:5432/mydb_test?schema=public" 6 | 7 | # Test environment flags 8 | NODE_ENV="test" 9 | NEXT_PUBLIC_APP_URL="http://localhost:3000" 10 | 11 | # Disable telemetry in tests 12 | NEXT_TELEMETRY_DISABLED=1 13 | 14 | # Optional: Enable test logging 15 | # LOG_LEVEL="error" 16 | 17 | # Optional: Mock external services (recommended) 18 | MOCK_EXTERNAL_SERVICES=true 19 | 20 | # Optional: Test timeout settings 21 | # JEST_TIMEOUT=10000 22 | # PLAYWRIGHT_TIMEOUT=30000 23 | -------------------------------------------------------------------------------- /src/solokit/quality/reporters/base.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Base reporter interface for quality gate results. 4 | """ 5 | 6 | from __future__ import annotations 7 | 8 | from abc import ABC, abstractmethod 9 | from typing import Any 10 | 11 | 12 | class Reporter(ABC): 13 | """Abstract base class for result reporters.""" 14 | 15 | @abstractmethod 16 | def generate(self, aggregated_results: dict[str, Any]) -> str: 17 | """Generate a report from aggregated results. 18 | 19 | Args: 20 | aggregated_results: Aggregated results from ResultAggregator 21 | 22 | Returns: 23 | Formatted report string 24 | """ 25 | pass # pragma: no cover 26 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-1-essential/tests/setup.ts: -------------------------------------------------------------------------------- 1 | // Add custom jest matchers from jest-dom 2 | import "@testing-library/jest-dom"; 3 | 4 | // Mock Next.js router 5 | jest.mock("next/navigation", () => ({ 6 | useRouter() { 7 | return { 8 | push: jest.fn(), 9 | replace: jest.fn(), 10 | prefetch: jest.fn(), 11 | back: jest.fn(), 12 | pathname: "/", 13 | query: {}, 14 | asPath: "/", 15 | }; 16 | }, 17 | usePathname() { 18 | return "/"; 19 | }, 20 | useSearchParams() { 21 | return new URLSearchParams(); 22 | }, 23 | })); 24 | 25 | // Mock environment variables 26 | process.env.NEXT_PUBLIC_API_URL = "https://api.fake-rest.refine.dev"; 27 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-1-essential/.prettierignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | .pnp 4 | .pnp.js 5 | 6 | # testing 7 | coverage 8 | 9 | # next.js 10 | .next 11 | out 12 | build 13 | 14 | # production 15 | dist 16 | 17 | # misc 18 | .DS_Store 19 | *.pem 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env*.local 28 | .env 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | 37 | # stryker 38 | .stryker-tmp 39 | reports 40 | report 41 | 42 | # playwright 43 | test-results 44 | playwright-report 45 | playwright/.cache 46 | 47 | # ci/cd 48 | .github 49 | 50 | # solokit 51 | .session 52 | .claude 53 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FEATURE]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/requirements.txt.template: -------------------------------------------------------------------------------- 1 | # Base Dependencies for {project_name} 2 | # FastAPI Framework 3 | fastapi==0.115.6 4 | uvicorn[standard]==0.34.0 5 | 6 | # Data Validation 7 | pydantic==2.12.4 8 | pydantic-core==2.41.5 9 | pydantic-settings==2.11.0 10 | 11 | # Database ORM 12 | sqlmodel==0.0.25 13 | sqlalchemy==2.0.37 14 | psycopg2-binary==2.9.10 15 | greenlet==3.2.4 16 | asyncpg==0.30.0 17 | 18 | # Database Migrations 19 | alembic==1.14.0 20 | 21 | # Environment Variables 22 | python-dotenv==1.2.1 23 | 24 | # Development Dependencies (Tier 1) 25 | pytest==8.3.4 26 | pytest-cov==6.0.0 27 | pytest-asyncio==0.25.2 28 | httpx==0.28.1 29 | aiosqlite==0.20.0 30 | ruff==0.9.2 31 | pyright==1.1.407 32 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-1-essential/.prettierignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | .pnp 4 | .pnp.js 5 | 6 | # testing 7 | coverage 8 | 9 | # next.js 10 | .next 11 | out 12 | build 13 | 14 | # production 15 | dist 16 | 17 | # misc 18 | .DS_Store 19 | *.pem 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env*.local 28 | .env 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | 37 | # stryker 38 | .stryker-tmp 39 | reports 40 | report 41 | 42 | # playwright 43 | test-results 44 | playwright-report 45 | playwright/.cache 46 | 47 | # ci/cd 48 | .github 49 | 50 | # solokit 51 | .session 52 | .claude 53 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-1-essential/.prettierignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | .pnp 4 | .pnp.js 5 | 6 | # testing 7 | coverage 8 | 9 | # next.js 10 | .next 11 | out 12 | build 13 | 14 | # production 15 | dist 16 | 17 | # misc 18 | .DS_Store 19 | *.pem 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env*.local 28 | .env 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | 37 | # stryker 38 | .stryker-tmp 39 | reports 40 | report 41 | 42 | # playwright 43 | test-results 44 | playwright-report 45 | playwright/.cache 46 | 47 | # ci/cd 48 | .github 49 | 50 | # solokit 51 | .session 52 | .claude 53 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/server/api/root.ts: -------------------------------------------------------------------------------- 1 | import { createCallerFactory, createTRPCRouter } from "@/server/api/trpc"; 2 | 3 | // Import your routers here 4 | // Example: import { postsRouter } from "@/server/api/routers/posts"; 5 | 6 | /** 7 | * This is the primary router for your server. 8 | * 9 | * All routers added in /api/routers should be manually added here. 10 | */ 11 | export const appRouter = createTRPCRouter({ 12 | // Add your routers here 13 | // Example: posts: postsRouter, 14 | }); 15 | 16 | // export type definition of API 17 | export type AppRouter = typeof appRouter; 18 | 19 | /** 20 | * Create a server-side caller for the tRPC API. 21 | */ 22 | export const createCaller = createCallerFactory(appRouter); 23 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/providers/refine-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { Refine } from "@refinedev/core"; 4 | import { 5 | refineDataProvider, 6 | refineRouterProvider, 7 | refineResources, 8 | refineOptions, 9 | } from "@/lib/refine"; 10 | 11 | /** 12 | * Refine Provider Component 13 | * Wraps the application with Refine context and configuration 14 | */ 15 | export function RefineProvider({ children }: { children: React.ReactNode }) { 16 | return ( 17 | 23 | {children} 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/env-templates/.env.local.example: -------------------------------------------------------------------------------- 1 | # Environment: Local Development 2 | # Copy this file to .env.local and fill in your values 3 | 4 | # API Configuration (Refine.dev) 5 | NEXT_PUBLIC_API_URL="https://api.fake-rest.refine.dev" 6 | 7 | # Development flags 8 | NODE_ENV="development" 9 | NEXT_PUBLIC_APP_URL="http://localhost:3000" 10 | 11 | # Optional: Sentry error tracking 12 | # SENTRY_DSN="your-sentry-dsn" 13 | 14 | # Optional: Vercel Analytics 15 | # NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id" 16 | 17 | # Optional: Enable debug logging 18 | # DEBUG="*" 19 | # LOG_LEVEL="debug" 20 | 21 | # Optional: Disable telemetry 22 | # NEXT_TELEMETRY_DISABLED=1 23 | 24 | # Optional: Mock external services 25 | # MOCK_EXTERNAL_SERVICES=true 26 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/env-templates/.env.local.example: -------------------------------------------------------------------------------- 1 | # Environment: Local Development 2 | # Copy this file to .env.local and fill in your values 3 | 4 | # Database 5 | DATABASE_URL="postgresql://postgres:postgres@localhost:5432/mydb?schema=public" 6 | 7 | # Development flags 8 | NODE_ENV="development" 9 | NEXT_PUBLIC_APP_URL="http://localhost:3000" 10 | 11 | # Optional: Sentry error tracking 12 | # SENTRY_DSN="your-sentry-dsn" 13 | 14 | # Optional: Vercel Analytics 15 | # NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id" 16 | 17 | # Optional: Enable debug logging 18 | # DEBUG="*" 19 | # LOG_LEVEL="debug" 20 | 21 | # Optional: Disable telemetry 22 | # NEXT_TELEMETRY_DISABLED=1 23 | 24 | # Optional: Mock external services 25 | # MOCK_EXTERNAL_SERVICES=true 26 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/.env.example.template: -------------------------------------------------------------------------------- 1 | # Application Configuration 2 | APP_NAME={project_name} 3 | APP_VERSION=0.1.0 4 | DEBUG=True 5 | ENVIRONMENT=development 6 | 7 | # Server Configuration 8 | HOST=0.0.0.0 9 | PORT=8000 10 | 11 | # Database Configuration 12 | DATABASE_URL=postgresql://user:password@localhost:5432/{project_name}_db 13 | 14 | # Security 15 | SECRET_KEY=your-secret-key-change-this-in-production 16 | ALLOWED_HOSTS=localhost,127.0.0.1 17 | 18 | # CORS Configuration 19 | CORS_ORIGINS=http://localhost:3000,http://localhost:8000 20 | 21 | # Logging 22 | LOG_LEVEL=DEBUG 23 | LOG_FORMAT=json 24 | 25 | # Redis (for caching/sessions - optional) 26 | REDIS_URL=redis://localhost:6379/0 27 | 28 | # API Keys (if needed) 29 | API_KEY=your-api-key-here 30 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-3-comprehensive/tests/integration/api.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration Tests 3 | * 4 | * Tests API endpoints via HTTP requests. 5 | */ 6 | 7 | describe("API Integration Tests", () => { 8 | it("should validate API endpoint structure", () => { 9 | // Placeholder integration test 10 | const mockEndpoint = "/api/health"; 11 | 12 | expect(mockEndpoint).toBeDefined(); 13 | expect(mockEndpoint).toMatch(/^\/api\//); 14 | }); 15 | 16 | it("should validate response data types", () => { 17 | const mockResponse = { 18 | success: true, 19 | data: { message: "OK" }, 20 | }; 21 | 22 | expect(typeof mockResponse.success).toBe("boolean"); 23 | expect(mockResponse.data).toHaveProperty("message"); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-3-comprehensive/tests/integration/api.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration Tests 3 | * 4 | * Tests API endpoints via HTTP requests. 5 | */ 6 | 7 | describe("API Integration Tests", () => { 8 | it("should validate API endpoint structure", () => { 9 | // Placeholder integration test 10 | const mockEndpoint = "/api/health"; 11 | 12 | expect(mockEndpoint).toBeDefined(); 13 | expect(mockEndpoint).toMatch(/^\/api\//); 14 | }); 15 | 16 | it("should validate response data types", () => { 17 | const mockResponse = { 18 | success: true, 19 | data: { message: "OK" }, 20 | }; 21 | 22 | expect(typeof mockResponse.success).toBe("boolean"); 23 | expect(mockResponse.data).toHaveProperty("message"); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-3-comprehensive/.vulture: -------------------------------------------------------------------------------- 1 | # Vulture configuration for dead code detection 2 | # https://github.com/jendrikseipp/vulture 3 | 4 | # Minimum confidence (0-100) for reporting unused code 5 | min_confidence = 80 6 | 7 | # Paths to check 8 | paths = src 9 | 10 | # Exclude patterns 11 | exclude = 12 | .venv/ 13 | venv/ 14 | __pycache__/ 15 | alembic/versions/ 16 | tests/ 17 | 18 | # Ignore names (regex patterns) 19 | ignore_names = 20 | # SQLModel/Pydantic model fields 21 | __tablename__ 22 | __table_args__ 23 | model_config 24 | model_fields 25 | # FastAPI lifespan 26 | lifespan 27 | # Common method names 28 | __str__ 29 | __repr__ 30 | # Logging config variables 31 | method_name 32 | logger 33 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/env-templates/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | 13 | # JavaScript, TypeScript, JSON, CSS 14 | [*.{js,jsx,ts,tsx,json,css}] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | # YAML 19 | [*.{yml,yaml}] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | # Markdown 24 | [*.md] 25 | trim_trailing_whitespace = false 26 | indent_style = space 27 | indent_size = 2 28 | 29 | # Package manager files 30 | [{package.json,package-lock.json,yarn.lock,pnpm-lock.yaml}] 31 | indent_style = space 32 | indent_size = 2 33 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/docker/docker-compose.prod.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | # Next.js application (production) 5 | app: 6 | build: 7 | context: .. 8 | dockerfile: docker/Dockerfile 9 | target: runner 10 | container_name: dashboard-refine-app-prod 11 | restart: always 12 | environment: 13 | - NODE_ENV=production 14 | - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL} 15 | - SENTRY_DSN=${SENTRY_DSN} 16 | ports: 17 | - '3000:3000' 18 | networks: 19 | - app_network 20 | healthcheck: 21 | test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:3000'] 22 | interval: 30s 23 | timeout: 10s 24 | retries: 3 25 | start_period: 40s 26 | 27 | networks: 28 | app_network: 29 | driver: bridge 30 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/env-templates/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | 13 | # JavaScript, TypeScript, JSON, CSS 14 | [*.{js,jsx,ts,tsx,json,css}] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | # YAML 19 | [*.{yml,yaml}] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | # Markdown 24 | [*.md] 25 | trim_trailing_whitespace = false 26 | indent_style = space 27 | indent_size = 2 28 | 29 | # Package manager files 30 | [{package.json,package-lock.json,yarn.lock,pnpm-lock.yaml}] 31 | indent_style = space 32 | indent_size = 2 33 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/env-templates/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | 13 | # JavaScript, TypeScript, JSON, CSS 14 | [*.{js,jsx,ts,tsx,json,css}] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | # YAML 19 | [*.{yml,yaml}] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | # Markdown 24 | [*.md] 25 | trim_trailing_whitespace = false 26 | indent_style = space 27 | indent_size = 2 28 | 29 | # Package manager files 30 | [{package.json,package-lock.json,yarn.lock,pnpm-lock.yaml}] 31 | indent_style = space 32 | indent_size = 2 33 | -------------------------------------------------------------------------------- /src/solokit/templates/git-hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | COMMIT_MSG_FILE=$1 4 | COMMIT_SOURCE=$2 5 | 6 | # Only run for regular commits (not merges, amends, etc.) 7 | if [ -z "$COMMIT_SOURCE" ]; then 8 | cat >> "$COMMIT_MSG_FILE" << 'EOF' 9 | 10 | # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11 | # REMINDERS: 12 | # 13 | # 📝 CHANGELOG: Update CHANGELOG.md for notable changes 14 | # (features, fixes, breaking changes) 15 | # 16 | # 💡 LEARNINGS: Add insights that will be auto-extracted during /sk:end 17 | # LEARNING: 18 | # 19 | # Examples: 20 | # LEARNING: JWT refresh tokens should expire faster than access tokens 21 | # LEARNING: Always use parameterized queries to prevent SQL injection 22 | # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23 | EOF 24 | fi 25 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-3-comprehensive/stryker.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", 3 | "packageManager": "npm", 4 | "reporters": ["html", "clear-text", "progress"], 5 | "testRunner": "jest", 6 | "jest": { 7 | "projectType": "custom", 8 | "configFile": "jest.config.ts", 9 | "enableFindRelatedTests": false 10 | }, 11 | "coverageAnalysis": "perTest", 12 | "mutate": [ 13 | "app/**/*.ts", 14 | "app/**/*.tsx", 15 | "server/**/*.ts", 16 | "lib/**/*.ts", 17 | "!**/*.test.ts", 18 | "!**/*.test.tsx", 19 | "!**/*.spec.ts", 20 | "!**/*.spec.tsx" 21 | ], 22 | "thresholds": { 23 | "high": 60, 24 | "low": 40, 25 | "break": 25 26 | }, 27 | "ignorePatterns": ["node_modules", ".next", "coverage", "dist", "build"] 28 | } 29 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/env-templates/.env.test.example: -------------------------------------------------------------------------------- 1 | # Environment: Test 2 | # Copy this file to .env.test and fill in your values 3 | 4 | # Database (use a separate test database) 5 | DATABASE_URL="postgresql://postgres:postgres@localhost:5432/mydb_test?schema=public" 6 | 7 | # Next Auth (use test-specific values) 8 | NEXTAUTH_SECRET="test-secret-do-not-use-in-production" 9 | NEXTAUTH_URL="http://localhost:3000" 10 | 11 | # Test environment flags 12 | NODE_ENV="test" 13 | NEXT_PUBLIC_APP_URL="http://localhost:3000" 14 | 15 | # Disable telemetry in tests 16 | NEXT_TELEMETRY_DISABLED=1 17 | 18 | # Optional: Enable test logging 19 | # LOG_LEVEL="error" 20 | 21 | # Optional: Mock external services (recommended) 22 | MOCK_EXTERNAL_SERVICES=true 23 | 24 | # Optional: Test timeout settings 25 | # JEST_TIMEOUT=10000 26 | # PLAYWRIGHT_TIMEOUT=30000 27 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/env-templates/.env.local.example: -------------------------------------------------------------------------------- 1 | # Environment: Local Development 2 | # Copy this file to .env.local and fill in your values 3 | 4 | # Database 5 | DATABASE_URL="postgresql://postgres:postgres@localhost:5432/mydb?schema=public" 6 | 7 | # Next Auth 8 | NEXTAUTH_SECRET="your-local-secret-here" 9 | NEXTAUTH_URL="http://localhost:3000" 10 | 11 | # Development flags 12 | NODE_ENV="development" 13 | NEXT_PUBLIC_APP_URL="http://localhost:3000" 14 | 15 | # Optional: Sentry error tracking 16 | # SENTRY_DSN="your-sentry-dsn" 17 | 18 | # Optional: Vercel Analytics 19 | # NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id" 20 | 21 | # Optional: Enable debug logging 22 | # DEBUG="*" 23 | # LOG_LEVEL="debug" 24 | 25 | # Optional: Disable telemetry 26 | # NEXT_TELEMETRY_DISABLED=1 27 | 28 | # Optional: Mock external services 29 | # MOCK_EXTERNAL_SERVICES=true 30 | -------------------------------------------------------------------------------- /.claude/commands/status.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Display current session status with progress overview 3 | --- 4 | 5 | # Session Status 6 | 7 | Get a quick overview of the current session by running: 8 | 9 | ```bash 10 | sk status 11 | ``` 12 | 13 | The status includes: 14 | 15 | - **Current Work Item**: What you're currently working on (title, type, priority) 16 | - **Time Elapsed**: How long the current session has been running 17 | - **Files Changed**: Number of files modified during this session 18 | - **Git Information**: Current branch and recent commits 19 | - **Milestone Progress**: Progress bar and completion percentage (if applicable) 20 | - **Next Work Items**: Upcoming tasks ready to start 21 | - **Quick Actions**: Suggested next steps 22 | 23 | Display the formatted status output to the user. This provides a quick snapshot of progress without interrupting the workflow. 24 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-3-comprehensive/stryker.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", 3 | "packageManager": "npm", 4 | "reporters": ["html", "clear-text", "progress"], 5 | "testRunner": "jest", 6 | "jest": { 7 | "projectType": "custom", 8 | "configFile": "jest.config.ts", 9 | "enableFindRelatedTests": false 10 | }, 11 | "coverageAnalysis": "perTest", 12 | "mutate": [ 13 | "app/**/*.ts", 14 | "app/**/*.tsx", 15 | "components/**/*.ts", 16 | "components/**/*.tsx", 17 | "lib/**/*.ts", 18 | "!**/*.test.ts", 19 | "!**/*.test.tsx", 20 | "!**/*.spec.ts", 21 | "!**/*.spec.tsx" 22 | ], 23 | "thresholds": { 24 | "high": 60, 25 | "low": 40, 26 | "break": 25 27 | }, 28 | "ignorePatterns": ["node_modules", ".next", "coverage", "dist", "build"] 29 | } 30 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/status.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Display current session status with progress overview 3 | --- 4 | 5 | # Session Status 6 | 7 | Get a quick overview of the current session by running: 8 | 9 | ```bash 10 | sk status 11 | ``` 12 | 13 | The status includes: 14 | 15 | - **Current Work Item**: What you're currently working on (title, type, priority) 16 | - **Time Elapsed**: How long the current session has been running 17 | - **Files Changed**: Number of files modified during this session 18 | - **Git Information**: Current branch and recent commits 19 | - **Milestone Progress**: Progress bar and completion percentage (if applicable) 20 | - **Next Work Items**: Upcoming tasks ready to start 21 | - **Quick Actions**: Suggested next steps 22 | 23 | Display the formatted status output to the user. This provides a quick snapshot of progress without interrupting the workflow. 24 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-1-essential/jest.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "jest"; 2 | import nextJest from "next/jest.js"; 3 | 4 | const createJestConfig = nextJest({ 5 | // Provide the path to your Next.js app to load next.config.js and .env files in your test environment 6 | dir: "./", 7 | }); 8 | 9 | // Add any custom config to be passed to Jest 10 | const config: Config = { 11 | coverageProvider: "v8", 12 | // Use standard jsdom environment for tier-1 and tier-2 13 | // Stryker's test environment is available starting from tier-3 14 | testEnvironment: "jest-environment-jsdom", 15 | setupFilesAfterEnv: ["/jest.setup.ts"], 16 | moduleNameMapper: { 17 | "^@/(.*)$": "/$1", 18 | }, 19 | }; 20 | 21 | // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async 22 | export default createJestConfig(config); 23 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-1-essential/jest.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "jest"; 2 | import nextJest from "next/jest.js"; 3 | 4 | const createJestConfig = nextJest({ 5 | // Provide the path to your Next.js app to load next.config.js and .env files in your test environment 6 | dir: "./", 7 | }); 8 | 9 | // Add any custom config to be passed to Jest 10 | const config: Config = { 11 | coverageProvider: "v8", 12 | // Use standard jsdom environment for tier-1 and tier-2 13 | // Stryker's test environment is available starting from tier-3 14 | testEnvironment: "jest-environment-jsdom", 15 | setupFilesAfterEnv: ["/jest.setup.ts"], 16 | moduleNameMapper: { 17 | "^@/(.*)$": "/$1", 18 | }, 19 | }; 20 | 21 | // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async 22 | export default createJestConfig(config); 23 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-1-essential/jest.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "jest"; 2 | import nextJest from "next/jest.js"; 3 | 4 | const createJestConfig = nextJest({ 5 | // Provide the path to your Next.js app to load next.config.js and .env files in your test environment 6 | dir: "./", 7 | }); 8 | 9 | // Add any custom config to be passed to Jest 10 | const config: Config = { 11 | coverageProvider: "v8", 12 | // Use standard jsdom environment for tier-1 and tier-2 13 | // Stryker's test environment is available starting from tier-3 14 | testEnvironment: "jest-environment-jsdom", 15 | setupFilesAfterEnv: ["/jest.setup.ts"], 16 | moduleNameMapper: { 17 | "^@/(.*)$": "/$1", 18 | }, 19 | }; 20 | 21 | // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async 22 | export default createJestConfig(config); 23 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/components/client-refine-wrapper.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import dynamic from "next/dynamic"; 4 | import React from "react"; 5 | 6 | /** 7 | * Client-only Refine Provider Wrapper 8 | * Uses dynamic import with ssr: false to avoid SSR/SSG issues with Refine's useSearchParams 9 | */ 10 | const RefineProvider = dynamic( 11 | () => 12 | import("@/providers/refine-provider").then((mod) => ({ 13 | default: mod.RefineProvider, 14 | })), 15 | { 16 | ssr: false, 17 | loading: () => ( 18 |
19 |
Loading...
20 |
21 | ), 22 | } 23 | ); 24 | 25 | type Props = { 26 | children: React.ReactNode; 27 | }; 28 | 29 | export default function ClientRefineWrapper({ children }: Props) { 30 | return {children}; 31 | } 32 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/package.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{project_name}", 3 | "version": "0.1.0", 4 | "description": "{project_description}", 5 | "private": true, 6 | "type": "module", 7 | "scripts": { 8 | "dev": "next dev", 9 | "build": "next build", 10 | "start": "next start", 11 | "lint": "eslint . --ext .ts,.tsx,.js,.jsx", 12 | "type-check": "tsc --noEmit" 13 | }, 14 | "dependencies": { 15 | "next": "16.0.7", 16 | "react": "19.2.1", 17 | "react-dom": "19.2.1", 18 | "prisma": "6.19.0", 19 | "@prisma/client": "6.19.0", 20 | "zod": "4.1.12", 21 | "tailwindcss": "4.1.17", 22 | "@tailwindcss/postcss": "4.1.17", 23 | "clsx": "2.1.1", 24 | "tailwind-merge": "3.3.1" 25 | }, 26 | "devDependencies": { 27 | "typescript": "5.9.3", 28 | "@types/node": "20.19.24", 29 | "@types/react": "19.2.2", 30 | "@types/react-dom": "19.2.2" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/ci-cd/.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | bundle-analysis: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Analyze bundle 27 | run: npm run --if-present analyze 28 | env: 29 | ANALYZE: true 30 | 31 | - name: Upload bundle analysis 32 | uses: actions/upload-artifact@v4 33 | if: always() 34 | with: 35 | name: bundle-analysis 36 | path: .next/analyze/ 37 | retention-days: 30 38 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/error.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | export default function Error({ 4 | error, 5 | reset, 6 | }: { 7 | error: Error & { digest?: string }; 8 | reset: () => void; 9 | }) { 10 | return ( 11 |
12 |
13 |
14 |

Something went wrong!

15 |

{error.message || "An unexpected error occurred"}

16 |
17 | 23 |
24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-2-standard/.git-secrets: -------------------------------------------------------------------------------- 1 | # git-secrets configuration 2 | # Prevent commits that contain secrets 3 | 4 | # AWS patterns 5 | [secrets] 6 | providers = git secrets --aws-provider 7 | patterns = (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16} 8 | patterns = (\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\\s*(:|=>|=)\\s*(\"|')?[A-Za-z0-9/\\+=]{40}(\"|')? 9 | patterns = (\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')? 10 | 11 | # Generic secrets 12 | patterns = [A-Za-z0-9_]{0,30}(password|passwd|pwd|secret|token|api[_-]?key)[A-Za-z0-9_]{0,30}\\s*(:|=>|=)\\s*['\"][^'\"]{8,}['\"] 13 | 14 | # Private keys 15 | patterns = -----BEGIN (RSA|DSA|EC|OPENSSH|PGP) PRIVATE KEY( BLOCK)?----- 16 | 17 | [secrets "allowed"] 18 | # Allowlist for false positives 19 | # Add patterns here that are safe to commit 20 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/error.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | export default function Error({ 4 | error, 5 | reset, 6 | }: { 7 | error: Error & { digest?: string }; 8 | reset: () => void; 9 | }) { 10 | return ( 11 |
12 |
13 |
14 |

Something went wrong!

15 |

{error.message || "An unexpected error occurred"}

16 |
17 | 23 |
24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /.claude/commands/work-show.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Show detailed information about a specific work item 3 | argument-hint: 4 | --- 5 | 6 | # Work Item Show 7 | 8 | Display detailed information for a specific work item by running: 9 | 10 | ```bash 11 | sk work-show "$@" 12 | ``` 13 | 14 | The work item ID is provided in `$ARGUMENTS` and passed through `"$@"`. 15 | 16 | This displays comprehensive details: 17 | 18 | - **Work Item Info**: Type, status, priority, creation date 19 | - **Dependencies**: List of dependencies with their current status 20 | - **Session History**: All sessions where this work item was worked on 21 | - **Git Information**: Branch name and associated commits 22 | - **Specification Preview**: First 30 lines of the spec file 23 | - **Next Steps**: Suggested actions based on current status 24 | 25 | Show all information to the user in a clear, formatted display. This helps understand the full context of a work item before starting work on it. 26 | -------------------------------------------------------------------------------- /.github/workflows/publish-pypi.yml: -------------------------------------------------------------------------------- 1 | name: Publish to PyPI 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | publish: 12 | name: Publish to PyPI 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout code 17 | uses: actions/checkout@v4 18 | 19 | - name: Set up Python 20 | uses: actions/setup-python@v5 21 | with: 22 | python-version: '3.11' 23 | 24 | - name: Install build dependencies 25 | run: | 26 | python -m pip install --upgrade pip 27 | pip install build twine 28 | 29 | - name: Build package 30 | run: python -m build 31 | 32 | - name: Check package 33 | run: twine check dist/* 34 | 35 | - name: Publish to PyPI 36 | uses: pypa/gh-action-pypi-publish@release/v1 37 | with: 38 | password: ${{ secrets.PYPI_API_TOKEN }} 39 | verbose: true 40 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-2-standard/.git-secrets: -------------------------------------------------------------------------------- 1 | # git-secrets configuration 2 | # Prevent commits that contain secrets 3 | 4 | # AWS patterns 5 | [secrets] 6 | providers = git secrets --aws-provider 7 | patterns = (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16} 8 | patterns = (\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\\s*(:|=>|=)\\s*(\"|')?[A-Za-z0-9/\\+=]{40}(\"|')? 9 | patterns = (\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')? 10 | 11 | # Generic secrets 12 | patterns = [A-Za-z0-9_]{0,30}(password|passwd|pwd|secret|token|api[_-]?key)[A-Za-z0-9_]{0,30}\\s*(:|=>|=)\\s*['\"][^'\"]{8,}['\"] 13 | 14 | # Private keys 15 | patterns = -----BEGIN (RSA|DSA|EC|OPENSSH|PGP) PRIVATE KEY( BLOCK)?----- 16 | 17 | [secrets "allowed"] 18 | # Allowlist for false positives 19 | # Add patterns here that are safe to commit 20 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "devCommand": "npm run dev", 4 | "installCommand": "npm install", 5 | "framework": "nextjs", 6 | "regions": ["iad1"], 7 | "env": { 8 | "SENTRY_DSN": "@sentry-dsn", 9 | "SENTRY_ORG": "@sentry-org", 10 | "SENTRY_PROJECT": "@sentry-project" 11 | }, 12 | "headers": [ 13 | { 14 | "source": "/(.*)", 15 | "headers": [ 16 | { 17 | "key": "X-Frame-Options", 18 | "value": "DENY" 19 | }, 20 | { 21 | "key": "X-Content-Type-Options", 22 | "value": "nosniff" 23 | }, 24 | { 25 | "key": "Referrer-Policy", 26 | "value": "strict-origin-when-cross-origin" 27 | }, 28 | { 29 | "key": "Permissions-Policy", 30 | "value": "camera=(), microphone=(), geolocation=()" 31 | } 32 | ] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-2-standard/.git-secrets: -------------------------------------------------------------------------------- 1 | # git-secrets configuration 2 | # Prevent commits that contain secrets 3 | 4 | # AWS patterns 5 | [secrets] 6 | providers = git secrets --aws-provider 7 | patterns = (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16} 8 | patterns = (\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\\s*(:|=>|=)\\s*(\"|')?[A-Za-z0-9/\\+=]{40}(\"|')? 9 | patterns = (\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')? 10 | 11 | # Generic secrets 12 | patterns = [A-Za-z0-9_]{0,30}(password|passwd|pwd|secret|token|api[_-]?key)[A-Za-z0-9_]{0,30}\\s*(:|=>|=)\\s*['\"][^'\"]{8,}['\"] 13 | 14 | # Private keys 15 | patterns = -----BEGIN (RSA|DSA|EC|OPENSSH|PGP) PRIVATE KEY( BLOCK)?----- 16 | 17 | [secrets "allowed"] 18 | # Allowlist for false positives 19 | # Add patterns here that are safe to commit 20 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | 12 | replaysOnErrorSampleRate: 1.0, 13 | 14 | // This sets the sample rate to be 10%. You may want this to be 100% while 15 | // in development and sample at a lower rate in production 16 | replaysSessionSampleRate: 0.1, 17 | 18 | // You can remove this option if you're not planning to use the Sentry Session Replay feature: 19 | integrations: [ 20 | Sentry.replayIntegration({ 21 | // Additional Replay configuration goes in here, for example: 22 | maskAllText: true, 23 | blockAllMedia: true, 24 | }), 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /src/solokit/quality/reporters/json_reporter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | JSON reporter for quality gate results. 4 | """ 5 | 6 | from __future__ import annotations 7 | 8 | import json 9 | from typing import Any 10 | 11 | from solokit.quality.reporters.base import Reporter 12 | 13 | 14 | class JSONReporter(Reporter): 15 | """Generates JSON-formatted reports.""" 16 | 17 | def __init__(self, indent: int = 2): 18 | """Initialize the JSON reporter. 19 | 20 | Args: 21 | indent: Number of spaces for JSON indentation (default: 2) 22 | """ 23 | self.indent = indent 24 | 25 | def generate(self, aggregated_results: dict[str, Any]) -> str: 26 | """Generate a JSON report. 27 | 28 | Args: 29 | aggregated_results: Aggregated results from ResultAggregator 30 | 31 | Returns: 32 | JSON-formatted report string 33 | """ 34 | return json.dumps(aggregated_results, indent=self.indent) 35 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/work-show.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Show detailed information about a specific work item 3 | argument-hint: 4 | --- 5 | 6 | # Work Item Show 7 | 8 | Display detailed information for a specific work item by running: 9 | 10 | ```bash 11 | sk work-show "$@" 12 | ``` 13 | 14 | The work item ID is provided in `$ARGUMENTS` and passed through `"$@"`. 15 | 16 | This displays comprehensive details: 17 | 18 | - **Work Item Info**: Type, status, priority, creation date 19 | - **Dependencies**: List of dependencies with their current status 20 | - **Session History**: All sessions where this work item was worked on 21 | - **Git Information**: Branch name and associated commits 22 | - **Specification Preview**: First 30 lines of the spec file 23 | - **Next Steps**: Suggested actions based on current status 24 | 25 | Show all information to the user in a clear, formatted display. This helps understand the full context of a work item before starting work on it. 26 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/app/error.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | export default function Error({ 4 | error, 5 | reset, 6 | }: { 7 | error: Error & { digest?: string }; 8 | reset: () => void; 9 | }) { 10 | return ( 11 |
12 |
13 |
14 |

Something went wrong!

15 |

16 | {error.message || "An unexpected error occurred"} 17 |

18 |
19 | 25 |
26 |
27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | 12 | replaysOnErrorSampleRate: 1.0, 13 | 14 | // This sets the sample rate to be 10%. You may want this to be 100% while 15 | // in development and sample at a lower rate in production 16 | replaysSessionSampleRate: 0.1, 17 | 18 | // You can remove this option if you're not planning to use the Sentry Session Replay feature: 19 | integrations: [ 20 | Sentry.replayIntegration({ 21 | // Additional Replay configuration goes in here, for example: 22 | maskAllText: true, 23 | blockAllMedia: true, 24 | }), 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | Sentry.init({ 4 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 5 | 6 | // Adjust this value in production, or use tracesSampler for greater control 7 | tracesSampleRate: 1, 8 | 9 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 10 | debug: false, 11 | 12 | replaysOnErrorSampleRate: 1.0, 13 | 14 | // This sets the sample rate to be 10%. You may want this to be 100% while 15 | // in development and sample at a lower rate in production 16 | replaysSessionSampleRate: 0.1, 17 | 18 | // You can remove this option if you're not planning to use the Sentry Session Replay feature: 19 | integrations: [ 20 | Sentry.replayIntegration({ 21 | // Additional Replay configuration goes in here, for example: 22 | maskAllText: true, 23 | blockAllMedia: true, 24 | }), 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /src/solokit/quality/checkers/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Quality checker modules.""" 3 | 4 | from __future__ import annotations 5 | 6 | from solokit.quality.checkers.base import CheckResult, QualityChecker 7 | from solokit.quality.checkers.custom import CustomValidationChecker 8 | from solokit.quality.checkers.documentation import DocumentationChecker 9 | from solokit.quality.checkers.formatting import FormattingChecker 10 | from solokit.quality.checkers.linting import LintingChecker 11 | from solokit.quality.checkers.security import SecurityChecker 12 | from solokit.quality.checkers.spec_completeness import SpecCompletenessChecker 13 | from solokit.quality.checkers.tests import ExecutionChecker 14 | 15 | __all__ = [ 16 | "CheckResult", 17 | "QualityChecker", 18 | "CustomValidationChecker", 19 | "DocumentationChecker", 20 | "FormattingChecker", 21 | "LintingChecker", 22 | "SecurityChecker", 23 | "SpecCompletenessChecker", 24 | "ExecutionChecker", 25 | ] 26 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/env-templates/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | 13 | # Python files 14 | [*.py] 15 | indent_style = space 16 | indent_size = 4 17 | 18 | # YAML 19 | [*.{yml,yaml}] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | # TOML 24 | [*.toml] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | # Markdown 29 | [*.md] 30 | trim_trailing_whitespace = false 31 | indent_style = space 32 | indent_size = 2 33 | 34 | # JSON 35 | [*.json] 36 | indent_style = space 37 | indent_size = 2 38 | 39 | # Configuration files 40 | [{.bandit,.secrets.baseline,.radon.cfg,.vulture}] 41 | indent_style = space 42 | indent_size = 2 43 | 44 | # Shell scripts 45 | [*.sh] 46 | indent_style = space 47 | indent_size = 2 48 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | .pnp 7 | .pnp.js 8 | 9 | # testing 10 | coverage 11 | .nyc_output 12 | 13 | # next.js 14 | .next/ 15 | out/ 16 | build 17 | dist 18 | 19 | # production 20 | .vercel 21 | 22 | # misc 23 | .DS_Store 24 | *.pem 25 | 26 | # debug 27 | *.log 28 | 29 | # local env files 30 | .env 31 | .env*.local 32 | .env.production 33 | 34 | # vercel 35 | .vercel 36 | 37 | # typescript 38 | *.tsbuildinfo 39 | next-env.d.ts 40 | 41 | # git 42 | .git 43 | .gitignore 44 | 45 | # IDE 46 | .vscode 47 | .idea 48 | 49 | # CI/CD 50 | .github 51 | 52 | # Docker 53 | Dockerfile 54 | .dockerignore 55 | docker-compose*.yml 56 | 57 | # Tests 58 | tests 59 | *.test.ts 60 | *.test.tsx 61 | *.spec.ts 62 | *.spec.tsx 63 | 64 | # Documentation 65 | README.md 66 | docs/ 67 | 68 | # Stryker 69 | .stryker-tmp 70 | reports/ 71 | 72 | # Playwright 73 | playwright-report/ 74 | test-results/ 75 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | .pnp 7 | .pnp.js 8 | 9 | # testing 10 | coverage 11 | .nyc_output 12 | 13 | # next.js 14 | .next/ 15 | out/ 16 | build 17 | dist 18 | 19 | # production 20 | .vercel 21 | 22 | # misc 23 | .DS_Store 24 | *.pem 25 | 26 | # debug 27 | *.log 28 | 29 | # local env files 30 | .env 31 | .env*.local 32 | .env.production 33 | 34 | # vercel 35 | .vercel 36 | 37 | # typescript 38 | *.tsbuildinfo 39 | next-env.d.ts 40 | 41 | # git 42 | .git 43 | .gitignore 44 | 45 | # IDE 46 | .vscode 47 | .idea 48 | 49 | # CI/CD 50 | .github 51 | 52 | # Docker 53 | Dockerfile 54 | .dockerignore 55 | docker-compose*.yml 56 | 57 | # Tests 58 | tests 59 | *.test.ts 60 | *.test.tsx 61 | *.spec.ts 62 | *.spec.tsx 63 | 64 | # Documentation 65 | README.md 66 | docs/ 67 | 68 | # Stryker 69 | .stryker-tmp 70 | reports/ 71 | 72 | # Playwright 73 | playwright-report/ 74 | test-results/ 75 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | .pnp 7 | .pnp.js 8 | 9 | # testing 10 | coverage 11 | .nyc_output 12 | 13 | # next.js 14 | .next/ 15 | out/ 16 | build 17 | dist 18 | 19 | # production 20 | .vercel 21 | 22 | # misc 23 | .DS_Store 24 | *.pem 25 | 26 | # debug 27 | *.log 28 | 29 | # local env files 30 | .env 31 | .env*.local 32 | .env.production 33 | 34 | # vercel 35 | .vercel 36 | 37 | # typescript 38 | *.tsbuildinfo 39 | next-env.d.ts 40 | 41 | # git 42 | .git 43 | .gitignore 44 | 45 | # IDE 46 | .vscode 47 | .idea 48 | 49 | # CI/CD 50 | .github 51 | 52 | # Docker 53 | Dockerfile 54 | .dockerignore 55 | docker-compose*.yml 56 | 57 | # Tests 58 | tests 59 | *.test.ts 60 | *.test.tsx 61 | *.spec.ts 62 | *.spec.tsx 63 | 64 | # Documentation 65 | README.md 66 | docs/ 67 | 68 | # Stryker 69 | .stryker-tmp 70 | reports/ 71 | 72 | # Playwright 73 | playwright-report/ 74 | test-results/ 75 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-3-comprehensive/stryker.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", 3 | "packageManager": "npm", 4 | "reporters": ["html", "clear-text", "progress"], 5 | "testRunner": "jest", 6 | "jest": { 7 | "projectType": "custom", 8 | "configFile": "jest.config.ts", 9 | "enableFindRelatedTests": false 10 | }, 11 | "coverageAnalysis": "perTest", 12 | "mutate": [ 13 | "app/**/*.ts", 14 | "app/**/*.tsx", 15 | "components/**/*.ts", 16 | "components/**/*.tsx", 17 | "lib/**/*.ts", 18 | "lib/**/*.tsx", 19 | "providers/**/*.ts", 20 | "providers/**/*.tsx", 21 | "!**/*.test.ts", 22 | "!**/*.test.tsx", 23 | "!**/*.spec.ts", 24 | "!**/*.spec.tsx", 25 | "!**/client-refine-wrapper.tsx" 26 | ], 27 | "thresholds": { 28 | "high": 60, 29 | "low": 40, 30 | "break": 25 31 | }, 32 | "ignorePatterns": ["node_modules", ".next", "coverage", "dist", "build"] 33 | } 34 | -------------------------------------------------------------------------------- /.pydocstyle: -------------------------------------------------------------------------------- 1 | [pydocstyle] 2 | # Ignore formatting issues in docstrings to allow gradual improvement 3 | # Focus on ensuring docstrings exist rather than strict formatting 4 | ignore = D400,D401,D202,D203,D212,D213,D205,D415,D413,D407,D406 5 | # Only check scripts, tests, and root Python files (exclude venv, build, etc.) 6 | match-dir = (scripts|tests|docs) 7 | # D400: First line should end with a period 8 | # D401: First line should be in imperative mood 9 | # D202: No blank lines allowed after function docstring 10 | # D203: 1 blank line required before class docstring 11 | # D212: Multi-line docstring summary should start at the first line 12 | # D213: Multi-line docstring summary should start at the second line 13 | # D205: 1 blank line required between summary line and description 14 | # D415: First line should end with a period, question mark, or exclamation point 15 | # D413: Missing blank line after last section 16 | # D407: Missing dashed underline after section 17 | # D406: Section name should end with a newline 18 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "devCommand": "npm run dev", 4 | "installCommand": "npm install", 5 | "framework": "nextjs", 6 | "regions": ["iad1"], 7 | "env": { 8 | "DATABASE_URL": "@database-url", 9 | "SENTRY_DSN": "@sentry-dsn", 10 | "SENTRY_ORG": "@sentry-org", 11 | "SENTRY_PROJECT": "@sentry-project" 12 | }, 13 | "headers": [ 14 | { 15 | "source": "/(.*)", 16 | "headers": [ 17 | { 18 | "key": "X-Frame-Options", 19 | "value": "DENY" 20 | }, 21 | { 22 | "key": "X-Content-Type-Options", 23 | "value": "nosniff" 24 | }, 25 | { 26 | "key": "Referrer-Policy", 27 | "value": "strict-origin-when-cross-origin" 28 | }, 29 | { 30 | "key": "Permissions-Policy", 31 | "value": "camera=(), microphone=(), geolocation=()" 32 | } 33 | ] 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /.claude/commands/work-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: List all work items with optional filtering 3 | argument-hint: [--status STATUS] [--type TYPE] [--milestone MILESTONE] 4 | --- 5 | 6 | # Work Item List 7 | 8 | List all work items, optionally filtered by status, type, or milestone. 9 | 10 | Run the following command: 11 | 12 | ```bash 13 | sk work-list "$@" 14 | ``` 15 | 16 | The CLI will automatically parse and handle filters from `$ARGUMENTS`: 17 | 18 | - `--status not_started` → Filters by status 19 | - `--type feature` → Filters by type 20 | - `--milestone phase_2_mvp` → Filters by milestone 21 | 22 | Available filter values: 23 | 24 | - **Status**: `not_started`, `in_progress`, `blocked`, `completed` 25 | - **Type**: `feature`, `bug`, `refactor`, `security`, `integration_test`, `deployment` 26 | - **Milestone**: Any milestone name from the project 27 | 28 | Display the color-coded work item list with priority indicators (🔴 critical, 🟠 high, 🟡 medium, 🟢 low) and dependency status markers (✓ ready, 🚫 blocked). 29 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/ci-cd/.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | bundle-analysis: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Generate Prisma Client 27 | run: npx prisma generate 28 | 29 | - name: Analyze bundle 30 | run: npm run --if-present analyze 31 | env: 32 | ANALYZE: true 33 | 34 | - name: Upload bundle analysis 35 | uses: actions/upload-artifact@v4 36 | if: always() 37 | with: 38 | name: bundle-analysis 39 | path: .next/analyze/ 40 | retention-days: 30 41 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/work-list.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: List all work items with optional filtering 3 | argument-hint: [--status STATUS] [--type TYPE] [--milestone MILESTONE] 4 | --- 5 | 6 | # Work Item List 7 | 8 | List all work items, optionally filtered by status, type, or milestone. 9 | 10 | Run the following command: 11 | 12 | ```bash 13 | sk work-list "$@" 14 | ``` 15 | 16 | The CLI will automatically parse and handle filters from `$ARGUMENTS`: 17 | 18 | - `--status not_started` → Filters by status 19 | - `--type feature` → Filters by type 20 | - `--milestone phase_2_mvp` → Filters by milestone 21 | 22 | Available filter values: 23 | 24 | - **Status**: `not_started`, `in_progress`, `blocked`, `completed` 25 | - **Type**: `feature`, `bug`, `refactor`, `security`, `integration_test`, `deployment` 26 | - **Milestone**: Any milestone name from the project 27 | 28 | Display the color-coded work item list with priority indicators (🔴 critical, 🟠 high, 🟡 medium, 🟢 low) and dependency status markers (✓ ready, 🚫 blocked). 29 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/ci-cd/.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | bundle-analysis: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Generate Prisma Client 27 | run: npx prisma generate 28 | 29 | - name: Analyze bundle 30 | run: npm run --if-present analyze 31 | env: 32 | ANALYZE: true 33 | 34 | - name: Upload bundle analysis 35 | uses: actions/upload-artifact@v4 36 | if: always() 37 | with: 38 | name: bundle-analysis 39 | path: .next/analyze/ 40 | retention-days: 30 41 | -------------------------------------------------------------------------------- /.claude/commands/validate.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Validate current session meets quality standards without ending it 3 | --- 4 | 5 | # Session Validate 6 | 7 | Run the validation script to check quality standards: 8 | 9 | ```bash 10 | sk validate 11 | ``` 12 | 13 | To automatically fix linting and formatting issues: 14 | 15 | ```bash 16 | sk validate --fix 17 | ``` 18 | 19 | The validation checks: 20 | 21 | - **Tests**: All test suites pass 22 | - **Linting**: Code passes linting rules (auto-fixable with --fix) 23 | - **Formatting**: Code is properly formatted (auto-fixable with --fix) 24 | - **Code Coverage**: Meets minimum coverage threshold 25 | - **Git Status**: Working directory is clean or has expected changes 26 | - **Acceptance Criteria**: Work item requirements are met 27 | 28 | Display the validation results to the user with a clear pass/fail status for each check. If linting or formatting fail, suggest using `/validate --fix` to automatically fix the issues. This command allows checking quality during development without ending the session. 29 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/page.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Home Page - Server Component 3 | * 4 | * This is a minimal starting point for your T3 application. 5 | * See ARCHITECTURE.md for patterns on adding features. 6 | */ 7 | export default function Home() { 8 | return ( 9 |
10 |
11 |

12 | Welcome to T3 13 |

14 |

15 | Your T3 Stack application is ready. Start building! 16 |

17 |
18 |

Read ARCHITECTURE.md to understand the stack patterns.

19 |

Create your PRD at docs/PRD.md to define your features.

20 |
21 |
22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "devCommand": "npm run dev", 4 | "installCommand": "npm install", 5 | "framework": "nextjs", 6 | "regions": ["iad1"], 7 | "env": { 8 | "DATABASE_URL": "@database-url", 9 | "NEXTAUTH_SECRET": "@nextauth-secret", 10 | "SENTRY_DSN": "@sentry-dsn", 11 | "SENTRY_ORG": "@sentry-org", 12 | "SENTRY_PROJECT": "@sentry-project" 13 | }, 14 | "headers": [ 15 | { 16 | "source": "/(.*)", 17 | "headers": [ 18 | { 19 | "key": "X-Frame-Options", 20 | "value": "DENY" 21 | }, 22 | { 23 | "key": "X-Content-Type-Options", 24 | "value": "nosniff" 25 | }, 26 | { 27 | "key": "Referrer-Policy", 28 | "value": "strict-origin-when-cross-origin" 29 | }, 30 | { 31 | "key": "Permissions-Policy", 32 | "value": "camera=(), microphone=(), geolocation=()" 33 | } 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-3-comprehensive/tests/integration/test_api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Integration tests for API endpoints 3 | """ 4 | 5 | import pytest 6 | from httpx import AsyncClient # type: ignore[import-not-found] 7 | 8 | 9 | @pytest.mark.integration 10 | class TestHealthEndpoints: 11 | """Integration tests for health check endpoints.""" 12 | 13 | async def test_health_endpoints_integration(self, integration_client: AsyncClient) -> None: 14 | """Test all health check endpoints.""" 15 | # Health check 16 | response = await integration_client.get("/health") 17 | assert response.status_code == 200 18 | assert response.json()["status"] == "healthy" 19 | 20 | # Readiness check 21 | response = await integration_client.get("/health/ready") 22 | assert response.status_code == 200 23 | 24 | # Liveness check 25 | response = await integration_client.get("/health/live") 26 | assert response.status_code == 200 27 | assert response.json()["status"] == "alive" 28 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-3-comprehensive/.axe-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "color-contrast": { "enabled": true }, 4 | "valid-lang": { "enabled": true }, 5 | "html-has-lang": { "enabled": true }, 6 | "image-alt": { "enabled": true }, 7 | "label": { "enabled": true }, 8 | "button-name": { "enabled": true }, 9 | "link-name": { "enabled": true }, 10 | "aria-valid-attr": { "enabled": true }, 11 | "aria-valid-attr-value": { "enabled": true }, 12 | "aria-required-attr": { "enabled": true }, 13 | "aria-roles": { "enabled": true }, 14 | "landmark-one-main": { "enabled": true }, 15 | "region": { "enabled": true }, 16 | "tabindex": { "enabled": true }, 17 | "bypass": { "enabled": true } 18 | }, 19 | "tags": ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"], 20 | "resultTypes": ["violations", "incomplete"], 21 | "runOnly": { 22 | "type": "tag", 23 | "values": ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "best-practice"] 24 | }, 25 | "reporter": "v2", 26 | "disableOtherRules": false 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-3-comprehensive/.axe-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "color-contrast": { "enabled": true }, 4 | "valid-lang": { "enabled": true }, 5 | "html-has-lang": { "enabled": true }, 6 | "image-alt": { "enabled": true }, 7 | "label": { "enabled": true }, 8 | "button-name": { "enabled": true }, 9 | "link-name": { "enabled": true }, 10 | "aria-valid-attr": { "enabled": true }, 11 | "aria-valid-attr-value": { "enabled": true }, 12 | "aria-required-attr": { "enabled": true }, 13 | "aria-roles": { "enabled": true }, 14 | "landmark-one-main": { "enabled": true }, 15 | "region": { "enabled": true }, 16 | "tabindex": { "enabled": true }, 17 | "bypass": { "enabled": true } 18 | }, 19 | "tags": ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"], 20 | "resultTypes": ["violations", "incomplete"], 21 | "runOnly": { 22 | "type": "tag", 23 | "values": ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "best-practice"] 24 | }, 25 | "reporter": "v2", 26 | "disableOtherRules": false 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-3-comprehensive/.axe-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "color-contrast": { "enabled": true }, 4 | "valid-lang": { "enabled": true }, 5 | "html-has-lang": { "enabled": true }, 6 | "image-alt": { "enabled": true }, 7 | "label": { "enabled": true }, 8 | "button-name": { "enabled": true }, 9 | "link-name": { "enabled": true }, 10 | "aria-valid-attr": { "enabled": true }, 11 | "aria-valid-attr-value": { "enabled": true }, 12 | "aria-required-attr": { "enabled": true }, 13 | "aria-roles": { "enabled": true }, 14 | "landmark-one-main": { "enabled": true }, 15 | "region": { "enabled": true }, 16 | "tabindex": { "enabled": true }, 17 | "bypass": { "enabled": true } 18 | }, 19 | "tags": ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"], 20 | "resultTypes": ["violations", "incomplete"], 21 | "runOnly": { 22 | "type": "tag", 23 | "values": ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "best-practice"] 24 | }, 25 | "reporter": "v2", 26 | "disableOtherRules": false 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/validate.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Validate current session meets quality standards without ending it 3 | --- 4 | 5 | # Session Validate 6 | 7 | Run the validation script to check quality standards: 8 | 9 | ```bash 10 | sk validate 11 | ``` 12 | 13 | To automatically fix linting and formatting issues: 14 | 15 | ```bash 16 | sk validate --fix 17 | ``` 18 | 19 | The validation checks: 20 | 21 | - **Tests**: All test suites pass 22 | - **Linting**: Code passes linting rules (auto-fixable with --fix) 23 | - **Formatting**: Code is properly formatted (auto-fixable with --fix) 24 | - **Code Coverage**: Meets minimum coverage threshold 25 | - **Git Status**: Working directory is clean or has expected changes 26 | - **Acceptance Criteria**: Work item requirements are met 27 | 28 | Display the validation results to the user with a clear pass/fail status for each check. If linting or formatting fail, suggest using `/validate --fix` to automatically fix the issues. This command allows checking quality during development without ending the session. 29 | -------------------------------------------------------------------------------- /.claude/commands/work-next.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get the next recommended work item to start based on dependencies and priority 3 | --- 4 | 5 | # Work Item Next 6 | 7 | Get an intelligent recommendation for the next work item to start: 8 | 9 | ```bash 10 | sk work-next 11 | ``` 12 | 13 | The recommendation algorithm analyzes: 14 | 15 | - **Available Work Items**: All items with `not_started` status 16 | - **Dependency Blocking**: Filters out items blocked by incomplete dependencies 17 | - **Priority Sorting**: Ranks by priority (critical > high > medium > low) 18 | - **Smart Selection**: Recommends the highest priority unblocked item 19 | 20 | Display to the user: 21 | 22 | - **Recommended Work Item**: Full details (ID, title, type, priority) 23 | - **Selection Rationale**: Why this item was chosen 24 | - **Dependency Status**: Confirmation that all dependencies are satisfied 25 | - **Context**: Overview of other waiting items (both blocked and ready) 26 | 27 | This helps maintain efficient workflow by always suggesting the most important work that can be started immediately. 28 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "postgresql" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | // Add your models here. Example: 14 | // 15 | // model User { 16 | // id Int @id @default(autoincrement()) 17 | // name String 18 | // email String @unique 19 | // posts Post[] 20 | // createdAt DateTime @default(now()) 21 | // updatedAt DateTime @updatedAt 22 | // 23 | // @@index([email]) 24 | // } 25 | // 26 | // model Post { 27 | // id Int @id @default(autoincrement()) 28 | // title String 29 | // content String? 30 | // published Boolean @default(false) 31 | // author User @relation(fields: [authorId], references: [id]) 32 | // authorId Int 33 | // createdAt DateTime @default(now()) 34 | // updatedAt DateTime @updatedAt 35 | // 36 | // @@index([authorId]) 37 | // } 38 | -------------------------------------------------------------------------------- /src/solokit/adopt/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adopt Module 3 | 4 | Handles adoption of Solokit into existing projects with code. 5 | Provides session management, quality gates, and learning capture 6 | without modifying existing project code. 7 | """ 8 | 9 | from solokit.adopt.doc_appender import ( 10 | append_documentation, 11 | append_to_claude_md, 12 | append_to_readme, 13 | ) 14 | from solokit.adopt.orchestrator import run_adoption 15 | from solokit.adopt.project_detector import ( 16 | ExistingTooling, 17 | PackageManager, 18 | ProjectFramework, 19 | ProjectInfo, 20 | ProjectLanguage, 21 | detect_project_type, 22 | get_project_summary, 23 | ) 24 | 25 | __all__ = [ 26 | # Orchestrator 27 | "run_adoption", 28 | # Project detection 29 | "detect_project_type", 30 | "get_project_summary", 31 | "ProjectInfo", 32 | "ProjectLanguage", 33 | "ProjectFramework", 34 | "PackageManager", 35 | "ExistingTooling", 36 | # Documentation 37 | "append_to_readme", 38 | "append_to_claude_md", 39 | "append_documentation", 40 | ] 41 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/work-next.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get the next recommended work item to start based on dependencies and priority 3 | --- 4 | 5 | # Work Item Next 6 | 7 | Get an intelligent recommendation for the next work item to start: 8 | 9 | ```bash 10 | sk work-next 11 | ``` 12 | 13 | The recommendation algorithm analyzes: 14 | 15 | - **Available Work Items**: All items with `not_started` status 16 | - **Dependency Blocking**: Filters out items blocked by incomplete dependencies 17 | - **Priority Sorting**: Ranks by priority (critical > high > medium > low) 18 | - **Smart Selection**: Recommends the highest priority unblocked item 19 | 20 | Display to the user: 21 | 22 | - **Recommended Work Item**: Full details (ID, title, type, priority) 23 | - **Selection Rationale**: Why this item was chosen 24 | - **Dependency Status**: Confirmation that all dependencies are satisfied 25 | - **Context**: Overview of other waiting items (both blocked and ready) 26 | 27 | This helps maintain efficient workflow by always suggesting the most important work that can be started immediately. 28 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/lib/prisma.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Prisma Client Instance 3 | * 4 | * This file implements the singleton pattern for Prisma Client to prevent 5 | * multiple instances during development (due to hot-reloading). 6 | * 7 | * Export name: "prisma" 8 | * This template uses the explicit name "prisma" to make it clear you're working 9 | * with Prisma Client. This is the standard pattern in the Prisma documentation. 10 | * 11 | * Usage: 12 | * import { prisma } from "@/lib/prisma"; 13 | * const items = await prisma.yourModel.findMany(); 14 | */ 15 | 16 | import { PrismaClient } from "@prisma/client"; 17 | 18 | const createPrismaClient = () => 19 | new PrismaClient({ 20 | log: process.env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"], 21 | }); 22 | 23 | const globalForPrisma = globalThis as unknown as { 24 | prisma: ReturnType | undefined; 25 | }; 26 | 27 | export const prisma = globalForPrisma.prisma ?? createPrismaClient(); 28 | 29 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; 30 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | # Python 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | *.so 6 | .Python 7 | 8 | # Virtual environments 9 | venv/ 10 | env/ 11 | ENV/ 12 | .venv/ 13 | 14 | # Testing 15 | .pytest_cache/ 16 | .coverage 17 | .coverage.* 18 | htmlcov/ 19 | .tox/ 20 | .hypothesis/ 21 | .mutmut-cache/ 22 | coverage.xml 23 | *.cover 24 | 25 | # IDEs 26 | .vscode/ 27 | .idea/ 28 | *.swp 29 | *.swo 30 | *~ 31 | .DS_Store 32 | 33 | # Environment variables 34 | .env 35 | .env.local 36 | .env.*.local 37 | 38 | # Git 39 | .git/ 40 | .gitignore 41 | .gitattributes 42 | 43 | # CI/CD 44 | .github/ 45 | 46 | # Documentation 47 | *.md 48 | docs/ 49 | 50 | # Database 51 | *.db 52 | *.sqlite 53 | *.sqlite3 54 | 55 | # Logs 56 | logs/ 57 | *.log 58 | 59 | # Alembic (include only config, not versions in source control) 60 | alembic/versions/*.py 61 | !alembic/versions/.gitkeep 62 | 63 | # Build artifacts 64 | build/ 65 | dist/ 66 | *.egg-info/ 67 | 68 | # Cache 69 | .ruff_cache/ 70 | .mypy_cache/ 71 | .pytype/ 72 | 73 | # Docker 74 | Dockerfile 75 | docker-compose*.yml 76 | .dockerignore 77 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/server/db.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Prisma Client Instance 3 | * 4 | * This file implements the singleton pattern for Prisma Client to prevent 5 | * multiple instances during development (due to hot-reloading). 6 | * 7 | * Export name: "db" 8 | * This template follows the T3 Stack convention of exporting as "db" for brevity 9 | * and consistency with the T3 ecosystem. This is the standard pattern used in 10 | * create-t3-app and throughout the T3 community. 11 | * 12 | * Usage: 13 | * import { db } from "@/server/db"; 14 | * const users = await db.user.findMany(); 15 | */ 16 | 17 | import { PrismaClient } from "@prisma/client"; 18 | 19 | const createPrismaClient = () => 20 | new PrismaClient({ 21 | log: process.env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"], 22 | }); 23 | 24 | const globalForPrisma = globalThis as unknown as { 25 | prisma: ReturnType | undefined; 26 | }; 27 | 28 | export const db = globalForPrisma.prisma ?? createPrismaClient(); 29 | 30 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = db; 31 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/globals.css: -------------------------------------------------------------------------------- 1 | /* 2 | * T3 Stack Global Styles 3 | * 4 | * This template uses Tailwind CSS v4 with CSS-first configuration. 5 | * Theme customization is done via @theme blocks below. 6 | * 7 | * If you want to add shadcn/ui components, you'll need to: 8 | * 1. Run: npx shadcn@latest init 9 | * 2. Extend the @theme block with additional color tokens 10 | * 3. Update components.json as needed 11 | */ 12 | 13 | @import "tailwindcss"; 14 | 15 | @theme { 16 | /* Color tokens using --color-* namespace for Tailwind v4 */ 17 | --color-background: #ffffff; 18 | --color-foreground: #171717; 19 | } 20 | 21 | /* Dark mode using prefers-color-scheme */ 22 | @media (prefers-color-scheme: dark) { 23 | :root { 24 | --color-background: #0a0a0a; 25 | --color-foreground: #ededed; 26 | } 27 | } 28 | 29 | body { 30 | color: var(--color-foreground); 31 | background: var(--color-background); 32 | font-family: Arial, Helvetica, sans-serif; 33 | } 34 | 35 | /* Custom utilities use @utility directive in Tailwind v4 */ 36 | @utility text-balance { 37 | text-wrap: balance; 38 | } 39 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/env-templates/.env.production.example: -------------------------------------------------------------------------------- 1 | # Environment: Production 2 | # IMPORTANT: Never commit actual production values to version control 3 | # Set these values in your deployment platform (Vercel, AWS, etc.) 4 | 5 | # API Configuration (Refine.dev) 6 | NEXT_PUBLIC_API_URL="https://api.yourapp.com" 7 | 8 | # Production flags 9 | NODE_ENV="production" 10 | NEXT_PUBLIC_APP_URL="https://yourdomain.com" 11 | 12 | # Sentry (Error Tracking) 13 | SENTRY_DSN="https://your-sentry-dsn@sentry.io/project-id" 14 | NEXT_PUBLIC_SENTRY_DSN="https://your-sentry-dsn@sentry.io/project-id" 15 | SENTRY_ORG="your-org" 16 | SENTRY_PROJECT="your-project" 17 | SENTRY_AUTH_TOKEN="your-auth-token" 18 | 19 | # Analytics 20 | NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id" 21 | 22 | # Optional: Performance monitoring 23 | # SENTRY_TRACES_SAMPLE_RATE=0.1 24 | # SENTRY_REPLAYS_SESSION_SAMPLE_RATE=0.1 25 | # SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE=1.0 26 | 27 | # Optional: Feature flags 28 | # ENABLE_EXPERIMENTAL_FEATURES=false 29 | 30 | # Optional: Rate limiting 31 | # RATE_LIMIT_MAX_REQUESTS=100 32 | # RATE_LIMIT_WINDOW_MS=60000 33 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/globals.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Full-Stack Next.js Global Styles 3 | * 4 | * This template uses Tailwind CSS v4 with CSS-first configuration. 5 | * Theme customization is done via @theme blocks below. 6 | * 7 | * If you want to add shadcn/ui components, you'll need to: 8 | * 1. Run: npx shadcn@latest init 9 | * 2. Extend the @theme block with additional color tokens 10 | * 3. Update components.json as needed 11 | */ 12 | 13 | @import "tailwindcss"; 14 | 15 | @theme { 16 | /* Color tokens using --color-* namespace for Tailwind v4 */ 17 | --color-background: #ffffff; 18 | --color-foreground: #171717; 19 | } 20 | 21 | /* Dark mode using prefers-color-scheme */ 22 | @media (prefers-color-scheme: dark) { 23 | :root { 24 | --color-background: #0a0a0a; 25 | --color-foreground: #ededed; 26 | } 27 | } 28 | 29 | body { 30 | color: var(--color-foreground); 31 | background: var(--color-background); 32 | font-family: Arial, Helvetica, sans-serif; 33 | } 34 | 35 | /* Custom utilities use @utility directive in Tailwind v4 */ 36 | @utility text-balance { 37 | text-wrap: balance; 38 | } 39 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/app/api/trpc/[trpc]/route.ts: -------------------------------------------------------------------------------- 1 | import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; 2 | import { type NextRequest } from "next/server"; 3 | 4 | import { appRouter } from "@/server/api/root"; 5 | import { createTRPCContext } from "@/server/api/trpc"; 6 | 7 | /** 8 | * This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when 9 | * handling a HTTP request (e.g. when you make requests from Client Components). 10 | */ 11 | const createContext = async (req: NextRequest) => { 12 | return createTRPCContext({ 13 | headers: req.headers, 14 | }); 15 | }; 16 | 17 | const handler = (req: NextRequest) => 18 | fetchRequestHandler({ 19 | endpoint: "/api/trpc", 20 | req, 21 | router: appRouter, 22 | createContext: () => createContext(req), 23 | onError: 24 | process.env.NODE_ENV === "development" 25 | ? ({ path, error }) => { 26 | console.error(`❌ tRPC failed on ${path ?? ""}: ${error.message}`); 27 | } 28 | : undefined, 29 | }); 30 | 31 | export { handler as GET, handler as POST }; 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | *.so 6 | .Python 7 | env/ 8 | venv/ 9 | .venv/ 10 | 11 | # Package build artifacts 12 | *.egg-info/ 13 | *.egg 14 | .eggs/ 15 | dist/ 16 | build/ 17 | 18 | # IDE 19 | .vscode/ 20 | .idea/ 21 | *.swp 22 | *.swo 23 | *~ 24 | 25 | # OS 26 | .DS_Store 27 | Thumbs.db 28 | 29 | # Testing 30 | .pytest_cache/ 31 | .coverage 32 | .coverage.* 33 | coverage.json 34 | coverage.xml 35 | htmlcov/ 36 | .tox/ 37 | 38 | # Type checking 39 | .mypy_cache/ 40 | .mypy_baseline_report.txt 41 | 42 | # Session data (don't commit .session directories from testing projects) 43 | **/.session/ 44 | !templates/ 45 | 46 | # Temporary files 47 | *.tmp 48 | *.log 49 | *.backup 50 | 51 | # Personal notes 52 | notes/ 53 | scratch/ 54 | demo-projects/ 55 | 56 | # Solokit-related patterns 57 | .session/briefings/ 58 | .session/history/ 59 | coverage/ 60 | node_modules/ 61 | *.pyc 62 | 63 | # Landing page 64 | landing/ 65 | 66 | # Marketing and promotion materials 67 | marketing-copy/ 68 | 69 | # Development scripts (untracked - contains GCP connection details, test scripts, test results) 70 | /dev-scripts/ 71 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Ankush Dixit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/env-templates/.env.production.example: -------------------------------------------------------------------------------- 1 | # Environment: Production 2 | # IMPORTANT: Never commit actual production values to version control 3 | # Set these values in your deployment platform (Vercel, AWS, etc.) 4 | 5 | # Database 6 | DATABASE_URL="postgresql://user:password@host:5432/database?schema=public" 7 | 8 | # Production flags 9 | NODE_ENV="production" 10 | NEXT_PUBLIC_APP_URL="https://yourdomain.com" 11 | 12 | # Sentry (Error Tracking) 13 | SENTRY_DSN="https://your-sentry-dsn@sentry.io/project-id" 14 | NEXT_PUBLIC_SENTRY_DSN="https://your-sentry-dsn@sentry.io/project-id" 15 | SENTRY_ORG="your-org" 16 | SENTRY_PROJECT="your-project" 17 | SENTRY_AUTH_TOKEN="your-auth-token" 18 | 19 | # Analytics 20 | NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id" 21 | 22 | # Optional: Performance monitoring 23 | # SENTRY_TRACES_SAMPLE_RATE=0.1 24 | # SENTRY_REPLAYS_SESSION_SAMPLE_RATE=0.1 25 | # SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE=1.0 26 | 27 | # Optional: Feature flags 28 | # ENABLE_EXPERIMENTAL_FEATURES=false 29 | 30 | # Optional: Rate limiting 31 | # RATE_LIMIT_MAX_REQUESTS=100 32 | # RATE_LIMIT_WINDOW_MS=60000 33 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/package.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{project_name}", 3 | "version": "0.1.0", 4 | "description": "{project_description}", 5 | "private": true, 6 | "type": "module", 7 | "scripts": { 8 | "dev": "next dev", 9 | "build": "next build", 10 | "start": "next start", 11 | "lint": "eslint . --ext .ts,.tsx,.js,.jsx", 12 | "type-check": "tsc --noEmit" 13 | }, 14 | "dependencies": { 15 | "next": "16.0.7", 16 | "react": "19.2.1", 17 | "react-dom": "19.2.1", 18 | "@trpc/server": "11.7.1", 19 | "@trpc/client": "11.7.1", 20 | "@trpc/react-query": "11.7.1", 21 | "@trpc/next": "11.7.1", 22 | "@tanstack/react-query": "5.90.7", 23 | "prisma": "6.19.0", 24 | "@prisma/client": "6.19.0", 25 | "zod": "4.1.12", 26 | "tailwindcss": "4.1.17", 27 | "@tailwindcss/postcss": "4.1.17", 28 | "superjson": "2.2.2", 29 | "clsx": "2.1.1", 30 | "tailwind-merge": "3.3.1" 31 | }, 32 | "devDependencies": { 33 | "typescript": "5.9.3", 34 | "@types/node": "20.19.24", 35 | "@types/react": "19.2.2", 36 | "@types/react-dom": "19.2.2" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/.lighthouserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "ci": { 3 | "collect": { 4 | "startServerCommand": "npm run start", 5 | "startServerReadyPattern": "Ready in", 6 | "startServerReadyTimeout": 30000, 7 | "url": ["http://localhost:3000"], 8 | "numberOfRuns": 3, 9 | "puppeteerLaunchArgs": ["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu"] 10 | }, 11 | "assert": { 12 | "assertions": { 13 | "categories:performance": ["error", { "minScore": 0.9 }], 14 | "categories:accessibility": ["error", { "minScore": 0.9 }], 15 | "categories:best-practices": ["error", { "minScore": 0.9 }], 16 | "categories:seo": ["error", { "minScore": 0.9 }], 17 | "first-contentful-paint": ["error", { "maxNumericValue": 2000 }], 18 | "largest-contentful-paint": ["error", { "maxNumericValue": 2500 }], 19 | "cumulative-layout-shift": ["error", { "maxNumericValue": 0.1 }], 20 | "total-blocking-time": ["error", { "maxNumericValue": 300 }] 21 | } 22 | }, 23 | "upload": { 24 | "target": "temporary-public-storage" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/.lighthouserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "ci": { 3 | "collect": { 4 | "startServerCommand": "npm run start", 5 | "startServerReadyPattern": "Ready in", 6 | "startServerReadyTimeout": 30000, 7 | "url": ["http://localhost:3000"], 8 | "numberOfRuns": 3, 9 | "puppeteerLaunchArgs": ["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu"] 10 | }, 11 | "assert": { 12 | "assertions": { 13 | "categories:performance": ["error", { "minScore": 0.9 }], 14 | "categories:accessibility": ["error", { "minScore": 0.9 }], 15 | "categories:best-practices": ["error", { "minScore": 0.9 }], 16 | "categories:seo": ["error", { "minScore": 0.9 }], 17 | "first-contentful-paint": ["error", { "maxNumericValue": 2000 }], 18 | "largest-contentful-paint": ["error", { "maxNumericValue": 3500 }], 19 | "cumulative-layout-shift": ["error", { "maxNumericValue": 0.1 }], 20 | "total-blocking-time": ["error", { "maxNumericValue": 300 }] 21 | } 22 | }, 23 | "upload": { 24 | "target": "temporary-public-storage" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/.lighthouserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "ci": { 3 | "collect": { 4 | "startServerCommand": "npm run start", 5 | "startServerReadyPattern": "Ready in", 6 | "startServerReadyTimeout": 30000, 7 | "url": ["http://localhost:3000"], 8 | "numberOfRuns": 3, 9 | "puppeteerLaunchArgs": ["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu"] 10 | }, 11 | "assert": { 12 | "assertions": { 13 | "categories:performance": ["error", { "minScore": 0.9 }], 14 | "categories:accessibility": ["error", { "minScore": 0.9 }], 15 | "categories:best-practices": ["error", { "minScore": 0.9 }], 16 | "categories:seo": ["error", { "minScore": 0.9 }], 17 | "first-contentful-paint": ["error", { "maxNumericValue": 2000 }], 18 | "largest-contentful-paint": ["error", { "maxNumericValue": 2500 }], 19 | "cumulative-layout-shift": ["error", { "maxNumericValue": 0.1 }], 20 | "total-blocking-time": ["error", { "maxNumericValue": 300 }] 21 | } 22 | }, 23 | "upload": { 24 | "target": "temporary-public-storage" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/.github/workflows/lighthouse.yml: -------------------------------------------------------------------------------- 1 | name: Lighthouse CI 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | lighthouse: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Install Playwright browsers (for Chrome) 27 | run: npx playwright install chromium --with-deps 28 | 29 | - name: Build application 30 | run: npm run build 31 | 32 | - name: Run Lighthouse CI 33 | run: npm run lighthouse 34 | env: 35 | LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} 36 | 37 | - name: Upload Lighthouse results 38 | uses: actions/upload-artifact@v4 39 | if: always() 40 | with: 41 | name: lighthouse-results 42 | path: .lighthouseci/ 43 | retention-days: 30 44 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "postgresql" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | // Add your models below. Example: 14 | // 15 | // model User { 16 | // id Int @id @default(autoincrement()) 17 | // email String @unique 18 | // name String? 19 | // posts Post[] 20 | // createdAt DateTime @default(now()) 21 | // updatedAt DateTime @updatedAt 22 | // 23 | // @@index([email]) 24 | // } 25 | // 26 | // model Post { 27 | // id Int @id @default(autoincrement()) 28 | // title String 29 | // content String? 30 | // published Boolean @default(false) 31 | // author User @relation(fields: [authorId], references: [id]) 32 | // authorId Int 33 | // createdAt DateTime @default(now()) 34 | // updatedAt DateTime @updatedAt 35 | // 36 | // @@index([authorId]) 37 | // } 38 | // 39 | // After adding models, run: 40 | // npx prisma migrate dev --name init 41 | // npx prisma generate 42 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/.github/workflows/lighthouse.yml: -------------------------------------------------------------------------------- 1 | name: Lighthouse CI 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | lighthouse: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Install Playwright browsers (for Chrome) 27 | run: npx playwright install chromium --with-deps 28 | 29 | - name: Build application 30 | run: npm run build 31 | 32 | - name: Run Lighthouse CI 33 | run: npm run lighthouse 34 | env: 35 | LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} 36 | 37 | - name: Upload Lighthouse results 38 | uses: actions/upload-artifact@v4 39 | if: always() 40 | with: 41 | name: lighthouse-results 42 | path: .lighthouseci/ 43 | retention-days: 30 44 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/.github/workflows/lighthouse.yml: -------------------------------------------------------------------------------- 1 | name: Lighthouse CI 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | lighthouse: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Install Playwright browsers (for Chrome) 27 | run: npx playwright install chromium --with-deps 28 | 29 | - name: Build application 30 | run: npm run build 31 | 32 | - name: Run Lighthouse CI 33 | run: npm run lighthouse 34 | env: 35 | LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} 36 | 37 | - name: Upload Lighthouse results 38 | uses: actions/upload-artifact@v4 39 | if: always() 40 | with: 41 | name: lighthouse-results 42 | path: .lighthouseci/ 43 | retention-days: 30 44 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-3-comprehensive/.coveragerc.template: -------------------------------------------------------------------------------- 1 | # Coverage.py configuration 2 | # https://coverage.readthedocs.io/ 3 | 4 | [run] 5 | source = src 6 | omit = 7 | tests/* 8 | alembic/* 9 | */__init__.py 10 | */venv/* 11 | */.venv/* 12 | # Tier 4 Production modules (optional features) 13 | src/api/routes/metrics.py 14 | src/core/logging.py 15 | src/core/monitoring.py 16 | src/core/sentry.py 17 | src/middleware/logging.py 18 | src/middleware/tracing.py 19 | 20 | branch = True 21 | parallel = True 22 | 23 | [report] 24 | precision = 2 25 | show_missing = True 26 | skip_covered = False 27 | sort = Cover 28 | 29 | # Fail if coverage is below threshold 30 | fail_under = {coverage_target} 31 | 32 | exclude_lines = 33 | # Default exclude patterns 34 | pragma: no cover 35 | def __repr__ 36 | raise AssertionError 37 | raise NotImplementedError 38 | if __name__ == .__main__.: 39 | if TYPE_CHECKING: 40 | @abstractmethod 41 | @abc.abstractmethod 42 | 43 | # Additional exclude patterns 44 | pass 45 | \.\.\. 46 | raise NotImplemented 47 | 48 | [html] 49 | directory = htmlcov 50 | 51 | [xml] 52 | output = coverage.xml 53 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-3-comprehensive/tests/integration/api.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration Tests 3 | * 4 | * Tests API endpoints via HTTP requests. 5 | * For tier-3+, these tests validate the full request/response flow. 6 | */ 7 | 8 | describe("API Integration Tests", () => { 9 | // Example: Health check endpoint 10 | it("should respond to health check", async () => { 11 | // This is a placeholder - in a real project, you would: 12 | // 1. Start a test server 13 | // 2. Make HTTP requests 14 | // 3. Validate responses 15 | 16 | const mockHealthResponse = { 17 | status: "ok", 18 | timestamp: new Date().toISOString(), 19 | }; 20 | 21 | expect(mockHealthResponse.status).toBe("ok"); 22 | expect(mockHealthResponse.timestamp).toBeDefined(); 23 | }); 24 | 25 | it("should validate API response structure", () => { 26 | // Example of testing response structure 27 | const mockApiResponse = { 28 | data: { id: "1", name: "Test" }, 29 | meta: { timestamp: new Date().toISOString() }, 30 | }; 31 | 32 | expect(mockApiResponse.data).toBeDefined(); 33 | expect(mockApiResponse.data.id).toBe("1"); 34 | expect(mockApiResponse.meta.timestamp).toBeDefined(); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/env-templates/.env.production.example: -------------------------------------------------------------------------------- 1 | # Environment: Production 2 | # IMPORTANT: Never commit actual production values to version control 3 | # Set these values in your deployment platform (Vercel, AWS, etc.) 4 | 5 | # Database 6 | DATABASE_URL="postgresql://user:password@host:5432/database?schema=public" 7 | 8 | # Next Auth 9 | NEXTAUTH_SECRET="generate-with-openssl-rand-base64-32" 10 | NEXTAUTH_URL="https://yourdomain.com" 11 | 12 | # Production flags 13 | NODE_ENV="production" 14 | NEXT_PUBLIC_APP_URL="https://yourdomain.com" 15 | 16 | # Sentry (Error Tracking) 17 | SENTRY_DSN="https://your-sentry-dsn@sentry.io/project-id" 18 | NEXT_PUBLIC_SENTRY_DSN="https://your-sentry-dsn@sentry.io/project-id" 19 | SENTRY_ORG="your-org" 20 | SENTRY_PROJECT="your-project" 21 | SENTRY_AUTH_TOKEN="your-auth-token" 22 | 23 | # Analytics 24 | NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id" 25 | 26 | # Optional: Performance monitoring 27 | # SENTRY_TRACES_SAMPLE_RATE=0.1 28 | # SENTRY_REPLAYS_SESSION_SAMPLE_RATE=0.1 29 | # SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE=1.0 30 | 31 | # Optional: Feature flags 32 | # ENABLE_EXPERIMENTAL_FEATURES=false 33 | 34 | # Optional: Rate limiting 35 | # RATE_LIMIT_MAX_REQUESTS=100 36 | # RATE_LIMIT_WINDOW_MS=60000 37 | -------------------------------------------------------------------------------- /src/solokit/commands/version.py: -------------------------------------------------------------------------------- 1 | """ 2 | Version command for Solokit CLI. 3 | 4 | Displays version information including Solokit version, Python version, and platform. 5 | """ 6 | 7 | from __future__ import annotations 8 | 9 | import platform 10 | import sys 11 | 12 | from solokit.__version__ import __version__ 13 | from solokit.core.output import get_output 14 | 15 | output = get_output() 16 | 17 | 18 | def show_version() -> int: 19 | """ 20 | Display version information. 21 | 22 | Shows: 23 | - Solokit version 24 | - Python version 25 | - Platform/OS 26 | 27 | Returns: 28 | Exit code (0 for success) 29 | 30 | Examples: 31 | >>> show_version() 32 | solokit version 0.1.4 33 | Python 3.11.7 on Darwin 34 | 0 35 | """ 36 | python_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" 37 | platform_name = platform.system() 38 | 39 | output.info(f"solokit version {__version__}") 40 | output.info(f"Python {python_version} on {platform_name}") 41 | 42 | return 0 43 | 44 | 45 | def main() -> int: 46 | """Main entry point for version command.""" 47 | return show_version() 48 | 49 | 50 | if __name__ == "__main__": 51 | sys.exit(main()) 52 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/package.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{project_name}", 3 | "version": "0.1.0", 4 | "description": "{project_description}", 5 | "private": true, 6 | "type": "module", 7 | "scripts": { 8 | "dev": "next dev", 9 | "build": "next build", 10 | "start": "next start", 11 | "lint": "eslint . --ext .ts,.tsx,.js,.jsx", 12 | "type-check": "tsc --noEmit" 13 | }, 14 | "dependencies": { 15 | "next": "16.0.7", 16 | "react": "19.2.1", 17 | "react-dom": "19.2.1", 18 | "@refinedev/cli": "latest", 19 | "@refinedev/core": "latest", 20 | "@refinedev/nextjs-router": "latest", 21 | "@refinedev/react-table": "latest", 22 | "@refinedev/react-hook-form": "latest", 23 | "recharts": "latest", 24 | "react-hook-form": "7.66.0", 25 | "zod": "4.1.12", 26 | "@hookform/resolvers": "latest", 27 | "lucide-react": "latest", 28 | "class-variance-authority": "0.7.1", 29 | "clsx": "2.1.1", 30 | "tailwind-merge": "3.3.1", 31 | "tailwindcss": "4.1.17", 32 | "@tailwindcss/postcss": "4.1.17" 33 | }, 34 | "devDependencies": { 35 | "typescript": "5.9.3", 36 | "@types/node": "20.19.24", 37 | "@types/react": "19.2.2", 38 | "@types/react-dom": "19.2.2" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/lib/env.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Environment Variable Validation 3 | * 4 | * This file validates environment variables at runtime using Zod. 5 | * It ensures that all required environment variables are present and valid 6 | * before the application starts. 7 | * 8 | * Benefits: 9 | * - Fail fast if env vars are missing or invalid 10 | * - Type-safe environment variables throughout the app 11 | * - Clear error messages for misconfiguration 12 | */ 13 | 14 | import { z } from "zod"; 15 | 16 | const envSchema = z.object({ 17 | // Database 18 | DATABASE_URL: z.string().url().min(1, "DATABASE_URL is required"), 19 | 20 | // Node Environment 21 | NODE_ENV: z.enum(["development", "production", "test"]).default("development"), 22 | }); 23 | 24 | // Validate environment variables 25 | const parsed = envSchema.safeParse(process.env); 26 | 27 | if (!parsed.success) { 28 | console.error("❌ Invalid environment variables:"); 29 | console.error(JSON.stringify(parsed.error.format(), null, 2)); 30 | throw new Error("Invalid environment variables"); 31 | } 32 | 33 | /** 34 | * Validated environment variables 35 | * 36 | * Usage: 37 | * import { env } from "@/lib/env"; 38 | * const dbUrl = env.DATABASE_URL; 39 | */ 40 | export const env = parsed.data; 41 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/lib/env.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Environment Variable Validation 3 | * 4 | * This file validates environment variables at runtime using Zod. 5 | * It ensures that all required environment variables are present and valid 6 | * before the application starts. 7 | * 8 | * Benefits: 9 | * - Fail fast if env vars are missing or invalid 10 | * - Type-safe environment variables throughout the app 11 | * - Clear error messages for misconfiguration 12 | */ 13 | 14 | import { z } from "zod"; 15 | 16 | const envSchema = z.object({ 17 | // Database 18 | DATABASE_URL: z.string().url().min(1, "DATABASE_URL is required"), 19 | 20 | // Node Environment 21 | NODE_ENV: z.enum(["development", "production", "test"]).default("development"), 22 | }); 23 | 24 | // Validate environment variables 25 | const parsed = envSchema.safeParse(process.env); 26 | 27 | if (!parsed.success) { 28 | console.error("❌ Invalid environment variables:"); 29 | console.error(JSON.stringify(parsed.error.format(), null, 2)); 30 | throw new Error("Invalid environment variables"); 31 | } 32 | 33 | /** 34 | * Validated environment variables 35 | * 36 | * Usage: 37 | * import { env } from "@/lib/env"; 38 | * const dbUrl = env.DATABASE_URL; 39 | */ 40 | export const env = parsed.data; 41 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/api/health/__tests__/route.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Health Check API Tests 3 | * 4 | * Note: We mock NextResponse because the Web APIs (Request, Response) 5 | * are not available in the Jest/jsdom environment. 6 | */ 7 | 8 | // Mock NextResponse before importing the route 9 | jest.mock("next/server", () => ({ 10 | NextResponse: { 11 | json: jest.fn((data: unknown, init?: { status?: number }) => ({ 12 | status: init?.status ?? 200, 13 | json: async () => data, 14 | headers: new Map([["content-type", "application/json"]]), 15 | })), 16 | }, 17 | })); 18 | 19 | import { GET } from "../route"; 20 | 21 | describe("Health Check API", () => { 22 | beforeEach(() => { 23 | jest.clearAllMocks(); 24 | }); 25 | 26 | it("returns healthy status", async () => { 27 | const response = await GET(); 28 | const data = await response.json(); 29 | 30 | expect(response.status).toBe(200); 31 | expect(data.status).toBe("healthy"); 32 | }); 33 | 34 | it("includes timestamp in response", async () => { 35 | const response = await GET(); 36 | const data = await response.json(); 37 | 38 | expect(data.timestamp).toBeDefined(); 39 | expect(new Date(data.timestamp).getTime()).not.toBeNaN(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | # PostgreSQL database for development 5 | db: 6 | image: postgres:16-alpine 7 | container_name: fullstack-nextjs-db 8 | restart: unless-stopped 9 | environment: 10 | POSTGRES_USER: postgres 11 | POSTGRES_PASSWORD: postgres 12 | POSTGRES_DB: mydb 13 | ports: 14 | - '5432:5432' 15 | volumes: 16 | - postgres_data:/var/lib/postgresql/data 17 | healthcheck: 18 | test: ['CMD-SHELL', 'pg_isready -U postgres'] 19 | interval: 10s 20 | timeout: 5s 21 | retries: 5 22 | 23 | # Next.js application (development) 24 | app: 25 | build: 26 | context: .. 27 | dockerfile: docker/Dockerfile 28 | target: builder 29 | container_name: fullstack-nextjs-app 30 | restart: unless-stopped 31 | depends_on: 32 | db: 33 | condition: service_healthy 34 | environment: 35 | - NODE_ENV=development 36 | - DATABASE_URL=postgresql://postgres:postgres@db:5432/mydb?schema=public 37 | ports: 38 | - '3000:3000' 39 | volumes: 40 | - ..:/app 41 | - /app/node_modules 42 | - /app/.next 43 | command: npm run dev 44 | 45 | volumes: 46 | postgres_data: 47 | driver: local 48 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/env-templates/.env.local.example.template: -------------------------------------------------------------------------------- 1 | # Local Development Environment Variables 2 | # Copy this file to .env.local and update with your local values 3 | 4 | # Application Configuration 5 | APP_NAME={project_name} 6 | APP_VERSION=0.1.0 7 | DEBUG=True 8 | ENVIRONMENT=development 9 | 10 | # Server Configuration 11 | HOST=0.0.0.0 12 | PORT=8000 13 | 14 | # Database Configuration (Local PostgreSQL) 15 | DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{project_name}_dev 16 | 17 | # Security (Use a random secret key) 18 | SECRET_KEY=dev-secret-key-change-in-production 19 | ALLOWED_HOSTS=localhost,127.0.0.1 20 | 21 | # CORS Configuration 22 | CORS_ORIGINS=http://localhost:3000,http://localhost:8000 23 | 24 | # Logging 25 | LOG_LEVEL=DEBUG 26 | LOG_FORMAT=console 27 | 28 | # Redis (for caching/sessions - optional) 29 | REDIS_URL=redis://localhost:6379/0 30 | 31 | # API Keys (if needed) 32 | API_KEY=dev-api-key 33 | 34 | # Sentry (disabled in development) 35 | # SENTRY_DSN= 36 | 37 | # Email (for development, use console backend) 38 | EMAIL_BACKEND=console 39 | 40 | # AWS (if using S3 for file storage) 41 | # AWS_ACCESS_KEY_ID= 42 | # AWS_SECRET_ACCESS_KEY= 43 | # AWS_S3_BUCKET_NAME= 44 | 45 | # OpenTelemetry (optional) 46 | # OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 47 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-1-essential/pyrightconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src", "tests"], 3 | "exclude": [ 4 | "**/__pycache__", 5 | ".venv", 6 | "venv", 7 | "build", 8 | "dist", 9 | "alembic/versions" 10 | ], 11 | "venvPath": ".", 12 | "venv": "venv", 13 | "defineConstant": { 14 | "DEBUG": true 15 | }, 16 | "stubPath": "typings", 17 | "reportMissingImports": true, 18 | "reportMissingTypeStubs": false, 19 | "pythonVersion": "3.11", 20 | "pythonPlatform": "All", 21 | "typeCheckingMode": "basic", 22 | "useLibraryCodeForTypes": true, 23 | "reportUnusedImport": true, 24 | "reportUnusedClass": "warning", 25 | "reportUnusedFunction": "warning", 26 | "reportUnusedVariable": "warning", 27 | "reportDuplicateImport": "warning", 28 | "reportOptionalSubscript": "warning", 29 | "reportOptionalMemberAccess": "warning", 30 | "reportOptionalCall": "warning", 31 | "reportOptionalIterable": "warning", 32 | "reportOptionalContextManager": "warning", 33 | "reportOptionalOperand": "warning", 34 | "reportTypedDictNotRequiredAccess": "warning", 35 | "reportPrivateUsage": "warning", 36 | "reportConstantRedefinition": "error", 37 | "reportIncompatibleMethodOverride": "error", 38 | "reportIncompatibleVariableOverride": "error", 39 | "reportInconsistentConstructor": "error" 40 | } 41 | -------------------------------------------------------------------------------- /.claude/commands/work-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Delete a work item from the system 3 | argument-hint: 4 | --- 5 | 6 | # Work Item Delete 7 | 8 | Delete a work item from the system with optional spec file removal. 9 | 10 | ## Usage 11 | 12 | ```bash 13 | sk work-delete "$@" 14 | ``` 15 | 16 | The work item ID is provided in `$ARGUMENTS` and passed through `"$@"`. 17 | 18 | ## What It Does 19 | 20 | The command will: 21 | 22 | - Display work item details and check for dependents 23 | - Warn if other work items depend on this one 24 | - Prompt for confirmation with options: 25 | - Delete work item only (keep spec file) 26 | - Delete both work item and spec file 27 | - Cancel deletion 28 | - Execute deletion based on your selection 29 | - Remind you to update dependent work items if needed 30 | 31 | ## Examples 32 | 33 | ```bash 34 | sk work-delete feature_obsolete_item 35 | sk work-delete bug_fixed_issue 36 | ``` 37 | 38 | ## Important Notes 39 | 40 | - **Deletion is permanent** - Work items cannot be recovered 41 | - **Dependents are NOT modified** - If other items depend on the deleted item, you must manually update them using `/work-update remove-dependency` 42 | - **Spec files are optional** - You can choose to keep the spec file for reference 43 | 44 | Show all command output to the user in a clear, formatted display. 45 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/env-templates/.env.test.example.template: -------------------------------------------------------------------------------- 1 | # Test Environment Variables 2 | # Used for running tests (unit, integration, etc.) 3 | 4 | # Application Configuration 5 | APP_NAME={project_name}_test 6 | APP_VERSION=0.1.0 7 | DEBUG=False 8 | ENVIRONMENT=test 9 | 10 | # Server Configuration 11 | HOST=localhost 12 | PORT=8000 13 | 14 | # Database Configuration (Use SQLite for tests or separate test DB) 15 | DATABASE_URL=sqlite+aiosqlite:///./test.db 16 | # Or use a separate PostgreSQL test database: 17 | # DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{project_name}_test 18 | 19 | # Security (Test secret key - not used in production) 20 | SECRET_KEY=test-secret-key-not-for-production 21 | ALLOWED_HOSTS=localhost,127.0.0.1,testserver 22 | 23 | # CORS Configuration 24 | CORS_ORIGINS=http://localhost:3000,http://testserver 25 | 26 | # Logging 27 | LOG_LEVEL=WARNING 28 | LOG_FORMAT=json 29 | 30 | # Redis (use separate DB for tests) 31 | REDIS_URL=redis://localhost:6379/1 32 | 33 | # API Keys (test keys) 34 | API_KEY=test-api-key 35 | 36 | # Disable external services in tests 37 | SENTRY_DSN= 38 | EMAIL_BACKEND=console 39 | 40 | # AWS (use mock or test credentials) 41 | # AWS_ACCESS_KEY_ID=test 42 | # AWS_SECRET_ACCESS_KEY=test 43 | # AWS_S3_BUCKET_NAME=test-bucket 44 | 45 | # Test-specific settings 46 | TESTING=True 47 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | reactStrictMode: true, 5 | 6 | // Security headers 7 | async headers() { 8 | return [ 9 | { 10 | source: "/:path*", 11 | headers: [ 12 | { 13 | key: "X-DNS-Prefetch-Control", 14 | value: "on", 15 | }, 16 | { 17 | key: "Strict-Transport-Security", 18 | value: "max-age=63072000; includeSubDomains; preload", 19 | }, 20 | { 21 | key: "X-Frame-Options", 22 | value: "SAMEORIGIN", 23 | }, 24 | { 25 | key: "X-Content-Type-Options", 26 | value: "nosniff", 27 | }, 28 | { 29 | key: "X-XSS-Protection", 30 | value: "1; mode=block", 31 | }, 32 | { 33 | key: "Referrer-Policy", 34 | value: "origin-when-cross-origin", 35 | }, 36 | { 37 | key: "Permissions-Policy", 38 | value: "camera=(), microphone=(), geolocation=()", 39 | }, 40 | ], 41 | }, 42 | ]; 43 | }, 44 | 45 | // Enable experimental features if needed 46 | // Add experimental features here 47 | }; 48 | 49 | export default nextConfig; 50 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | reactStrictMode: true, 5 | 6 | // Security headers 7 | async headers() { 8 | return [ 9 | { 10 | source: "/:path*", 11 | headers: [ 12 | { 13 | key: "X-DNS-Prefetch-Control", 14 | value: "on", 15 | }, 16 | { 17 | key: "Strict-Transport-Security", 18 | value: "max-age=63072000; includeSubDomains; preload", 19 | }, 20 | { 21 | key: "X-Frame-Options", 22 | value: "SAMEORIGIN", 23 | }, 24 | { 25 | key: "X-Content-Type-Options", 26 | value: "nosniff", 27 | }, 28 | { 29 | key: "X-XSS-Protection", 30 | value: "1; mode=block", 31 | }, 32 | { 33 | key: "Referrer-Policy", 34 | value: "origin-when-cross-origin", 35 | }, 36 | { 37 | key: "Permissions-Policy", 38 | value: "camera=(), microphone=(), geolocation=()", 39 | }, 40 | ], 41 | }, 42 | ]; 43 | }, 44 | 45 | // Enable experimental features if needed 46 | // Add experimental features here 47 | }; 48 | 49 | export default nextConfig; 50 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | reactStrictMode: true, 5 | 6 | // Security headers 7 | async headers() { 8 | return [ 9 | { 10 | source: "/:path*", 11 | headers: [ 12 | { 13 | key: "X-DNS-Prefetch-Control", 14 | value: "on", 15 | }, 16 | { 17 | key: "Strict-Transport-Security", 18 | value: "max-age=63072000; includeSubDomains; preload", 19 | }, 20 | { 21 | key: "X-Frame-Options", 22 | value: "SAMEORIGIN", 23 | }, 24 | { 25 | key: "X-Content-Type-Options", 26 | value: "nosniff", 27 | }, 28 | { 29 | key: "X-XSS-Protection", 30 | value: "1; mode=block", 31 | }, 32 | { 33 | key: "Referrer-Policy", 34 | value: "origin-when-cross-origin", 35 | }, 36 | { 37 | key: "Permissions-Policy", 38 | value: "camera=(), microphone=(), geolocation=()", 39 | }, 40 | ], 41 | }, 42 | ]; 43 | }, 44 | 45 | // Enable experimental features if needed 46 | // Add experimental features here 47 | }; 48 | 49 | export default nextConfig; 50 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/work-delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Delete a work item from the system 3 | argument-hint: 4 | --- 5 | 6 | # Work Item Delete 7 | 8 | Delete a work item from the system with optional spec file removal. 9 | 10 | ## Usage 11 | 12 | ```bash 13 | sk work-delete "$@" 14 | ``` 15 | 16 | The work item ID is provided in `$ARGUMENTS` and passed through `"$@"`. 17 | 18 | ## What It Does 19 | 20 | The command will: 21 | 22 | - Display work item details and check for dependents 23 | - Warn if other work items depend on this one 24 | - Prompt for confirmation with options: 25 | - Delete work item only (keep spec file) 26 | - Delete both work item and spec file 27 | - Cancel deletion 28 | - Execute deletion based on your selection 29 | - Remind you to update dependent work items if needed 30 | 31 | ## Examples 32 | 33 | ```bash 34 | sk work-delete feature_obsolete_item 35 | sk work-delete bug_fixed_issue 36 | ``` 37 | 38 | ## Important Notes 39 | 40 | - **Deletion is permanent** - Work items cannot be recovered 41 | - **Dependents are NOT modified** - If other items depend on the deleted item, you must manually update them using `/work-update remove-dependency` 42 | - **Spec files are optional** - You can choose to keep the spec file for reference 43 | 44 | Show all command output to the user in a clear, formatted display. 45 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | # PostgreSQL database for development 5 | db: 6 | image: postgres:16-alpine 7 | container_name: saas-t3-db 8 | restart: unless-stopped 9 | environment: 10 | POSTGRES_USER: postgres 11 | POSTGRES_PASSWORD: postgres 12 | POSTGRES_DB: mydb 13 | ports: 14 | - '5432:5432' 15 | volumes: 16 | - postgres_data:/var/lib/postgresql/data 17 | healthcheck: 18 | test: ['CMD-SHELL', 'pg_isready -U postgres'] 19 | interval: 10s 20 | timeout: 5s 21 | retries: 5 22 | 23 | # Next.js application (development) 24 | app: 25 | build: 26 | context: .. 27 | dockerfile: docker/Dockerfile 28 | target: builder 29 | container_name: saas-t3-app 30 | restart: unless-stopped 31 | depends_on: 32 | db: 33 | condition: service_healthy 34 | environment: 35 | - NODE_ENV=development 36 | - DATABASE_URL=postgresql://postgres:postgres@db:5432/mydb?schema=public 37 | - NEXTAUTH_SECRET=your-secret-here 38 | - NEXTAUTH_URL=http://localhost:3000 39 | ports: 40 | - '3000:3000' 41 | volumes: 42 | - ..:/app 43 | - /app/node_modules 44 | - /app/.next 45 | command: npm run dev 46 | 47 | volumes: 48 | postgres_data: 49 | driver: local 50 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/__tests__/page.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react"; 2 | import Home from "../page"; 3 | 4 | describe("Home Page", () => { 5 | it("renders the main heading", () => { 6 | const { container } = render(); 7 | 8 | expect(container.textContent).toContain("Full-Stack"); 9 | expect(container.textContent).toContain("Next.js"); 10 | }); 11 | 12 | it("displays getting started message", () => { 13 | const { container } = render(); 14 | 15 | expect(container.textContent).toContain("Your project is ready"); 16 | }); 17 | 18 | it("has link to health check endpoint", () => { 19 | const { container } = render(); 20 | 21 | const link = container.querySelector('a[href="/api/health"]'); 22 | expect(link).toBeInTheDocument(); 23 | expect(container.textContent).toContain("Health Check"); 24 | }); 25 | 26 | it("references ARCHITECTURE.md", () => { 27 | const { container } = render(); 28 | 29 | expect(container.textContent).toContain("ARCHITECTURE.md"); 30 | }); 31 | 32 | it("has theme-based background styling", () => { 33 | const { container } = render(); 34 | 35 | const main = container.querySelector("main"); 36 | expect(main).toHaveClass("bg-background"); 37 | expect(main).toHaveClass("text-foreground"); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /tests/unit/commands/test_version.py: -------------------------------------------------------------------------------- 1 | """Unit tests for version command.""" 2 | 3 | import platform 4 | import sys 5 | 6 | from solokit.__version__ import __version__ 7 | from solokit.commands.version import show_version 8 | 9 | 10 | def test_version_shows_version_number(capsys): 11 | """Test that version command displays the version number.""" 12 | result = show_version() 13 | 14 | captured = capsys.readouterr() 15 | assert f"solokit version {__version__}" in captured.out 16 | assert result == 0 17 | 18 | 19 | def test_version_shows_python_version(capsys): 20 | """Test that version command displays Python version.""" 21 | result = show_version() 22 | 23 | captured = capsys.readouterr() 24 | python_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" 25 | assert f"Python {python_version}" in captured.out 26 | assert result == 0 27 | 28 | 29 | def test_version_shows_platform(capsys): 30 | """Test that version command displays platform information.""" 31 | result = show_version() 32 | 33 | captured = capsys.readouterr() 34 | platform_name = platform.system() 35 | assert platform_name in captured.out 36 | assert result == 0 37 | 38 | 39 | def test_version_returns_success_code(): 40 | """Test that version command returns exit code 0.""" 41 | result = show_version() 42 | assert result == 0 43 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yml: -------------------------------------------------------------------------------- 1 | name: Pre-commit Checks 2 | 3 | on: 4 | pull_request: 5 | branches: [ main, develop ] 6 | 7 | jobs: 8 | pre-commit: 9 | name: Pre-commit Checks 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v4 15 | 16 | - name: Set up Python 17 | uses: actions/setup-python@v5 18 | with: 19 | python-version: "3.11" 20 | 21 | - name: Check for secrets 22 | run: | 23 | # Check for common secret patterns 24 | ! grep -r "password\s*=\s*['\"].*['\"]" src/solokit/ tests/ || (echo "Found hardcoded password" && exit 1) 25 | ! grep -r "api_key\s*=\s*['\"].*['\"]" src/solokit/ tests/ || (echo "Found hardcoded API key" && exit 1) 26 | ! grep -r "secret\s*=\s*['\"].*['\"]" src/solokit/ tests/ || (echo "Found hardcoded secret" && exit 1) 27 | 28 | - name: Check file sizes 29 | run: | 30 | # Check for large files (>1MB) 31 | find . -type f -size +1M ! -path "./.git/*" -exec ls -lh {} \; | awk '{print $9, $5}' || true 32 | 33 | - name: Check for debug statements 34 | run: | 35 | # Warn about debug statements (don't fail) 36 | grep -rn "import pdb\|pdb.set_trace()\|breakpoint()" src/solokit/ tests/ || true 37 | 38 | - name: Check Python syntax 39 | run: | 40 | python -m py_compile src/solokit/**/*.py 41 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: help install test lint format typecheck clean build 2 | 3 | help: 4 | @echo "Solokit - Session-Driven Development" 5 | @echo "" 6 | @echo "Available targets:" 7 | @echo " help - Show this help message" 8 | @echo " install - Install dependencies" 9 | @echo " test - Run test suite" 10 | @echo " lint - Run linting (ruff + bandit)" 11 | @echo " typecheck - Run type checking with mypy" 12 | @echo " format - Format code with ruff" 13 | @echo " clean - Remove build artifacts and caches" 14 | @echo " build - Build distribution packages" 15 | 16 | install: 17 | pip install -e . 18 | pip install -r requirements.txt 19 | 20 | test: 21 | pytest tests/ -v 22 | 23 | lint: 24 | ruff check . 25 | bandit -r scripts/ sdd_cli.py 26 | 27 | typecheck: 28 | mypy src/solokit 29 | 30 | format: 31 | ruff check --fix . 32 | ruff format . 33 | 34 | clean: 35 | rm -rf build/ 36 | rm -rf dist/ 37 | rm -rf *.egg-info 38 | rm -rf src/*.egg-info 39 | rm -rf .pytest_cache/ 40 | rm -rf .ruff_cache/ 41 | rm -rf .mypy_cache/ 42 | rm -rf htmlcov/ 43 | find . -type d -name __pycache__ -exec rm -rf {} + 44 | find . -type f -name "*.pyc" -delete 45 | find . -type f -name "*.pyo" -delete 46 | find . -type f -name ".coverage" -delete 47 | find . -type f -name "coverage.xml" -delete 48 | find . -type f -name "coverage.json" -delete 49 | 50 | build: 51 | python setup.py sdist bdist_wheel 52 | -------------------------------------------------------------------------------- /.claude/commands/learn-search.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Search learnings by keyword 3 | argument-hint: 4 | --- 5 | 6 | # Search Learnings 7 | 8 | Full-text search across all learning content, tags, and context. 9 | 10 | ## Usage 11 | 12 | Extract the search query from $ARGUMENTS and run: 13 | 14 | ```bash 15 | sk learn-search "$@" 16 | ``` 17 | 18 | ### How Search Works 19 | 20 | The search looks for matches in: 21 | 22 | - Learning content (main text) 23 | - Tags 24 | - Context/notes 25 | - Category names 26 | 27 | Search is case-insensitive and finds partial matches. 28 | 29 | ### Examples 30 | 31 | Search for "CORS": 32 | 33 | ```bash 34 | sk learn-search "CORS" 35 | ``` 36 | 37 | Search for "FastAPI middleware": 38 | 39 | ```bash 40 | sk learn-search "FastAPI middleware" 41 | ``` 42 | 43 | Search for "authentication": 44 | 45 | ```bash 46 | sk learn-search "authentication" 47 | ``` 48 | 49 | ## Display Format 50 | 51 | Show matching learnings with: 52 | 53 | - Learning content with matched text highlighted 54 | - Category and tags 55 | - Session where captured 56 | - Relevance score or match indicator 57 | - Learning ID 58 | 59 | Present results in order of relevance, grouped by category. 60 | 61 | ## Tips for Users 62 | 63 | Suggest to users: 64 | 65 | - Use specific keywords for better results 66 | - Try tag names if searching by topic 67 | - Use category names to narrow results 68 | - Combine with `/learn-show --category` for focused browsing 69 | -------------------------------------------------------------------------------- /src/solokit/templates/.claude/commands/learn-search.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Search learnings by keyword 3 | argument-hint: 4 | --- 5 | 6 | # Search Learnings 7 | 8 | Full-text search across all learning content, tags, and context. 9 | 10 | ## Usage 11 | 12 | Extract the search query from $ARGUMENTS and run: 13 | 14 | ```bash 15 | sk learn-search "$@" 16 | ``` 17 | 18 | ### How Search Works 19 | 20 | The search looks for matches in: 21 | 22 | - Learning content (main text) 23 | - Tags 24 | - Context/notes 25 | - Category names 26 | 27 | Search is case-insensitive and finds partial matches. 28 | 29 | ### Examples 30 | 31 | Search for "CORS": 32 | 33 | ```bash 34 | sk learn-search "CORS" 35 | ``` 36 | 37 | Search for "FastAPI middleware": 38 | 39 | ```bash 40 | sk learn-search "FastAPI middleware" 41 | ``` 42 | 43 | Search for "authentication": 44 | 45 | ```bash 46 | sk learn-search "authentication" 47 | ``` 48 | 49 | ## Display Format 50 | 51 | Show matching learnings with: 52 | 53 | - Learning content with matched text highlighted 54 | - Category and tags 55 | - Session where captured 56 | - Relevance score or match indicator 57 | - Learning ID 58 | 59 | Present results in order of relevance, grouped by category. 60 | 61 | ## Tips for Users 62 | 63 | Suggest to users: 64 | 65 | - Use specific keywords for better results 66 | - Try tag names if searching by topic 67 | - Use category names to narrow results 68 | - Combine with `/learn-show --category` for focused browsing 69 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/lib/__tests__/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { cn } from "../utils"; 2 | 3 | describe("cn utility function", () => { 4 | it("merges class names correctly", () => { 5 | expect(cn("px-2 py-1", "bg-blue-500")).toBe("px-2 py-1 bg-blue-500"); 6 | }); 7 | 8 | it("handles conditional classes", () => { 9 | const isActive = false; 10 | const isHighlighted = true; 11 | expect(cn("px-2", isActive && "py-1")).toBe("px-2"); 12 | expect(cn("px-2", isHighlighted && "py-1")).toBe("px-2 py-1"); 13 | }); 14 | 15 | it("handles undefined and null values", () => { 16 | expect(cn("px-2", undefined, null, "py-1")).toBe("px-2 py-1"); 17 | }); 18 | 19 | it("merges conflicting Tailwind classes correctly", () => { 20 | expect(cn("px-2", "px-4")).toBe("px-4"); 21 | expect(cn("text-red-500", "text-blue-500")).toBe("text-blue-500"); 22 | }); 23 | 24 | it("handles empty inputs", () => { 25 | expect(cn()).toBe(""); 26 | expect(cn("")).toBe(""); 27 | }); 28 | 29 | it("handles array inputs", () => { 30 | expect(cn(["px-2", "py-1"])).toBe("px-2 py-1"); 31 | }); 32 | 33 | it("handles object inputs with boolean values", () => { 34 | expect(cn({ "px-2": true, "py-1": false, "bg-blue": true })).toBe("px-2 bg-blue"); 35 | }); 36 | 37 | it("combines multiple types of inputs", () => { 38 | const isHidden = false; 39 | expect(cn("px-2", { "py-1": true }, ["bg-blue"], isHidden && "hidden")).toBe( 40 | "px-2 py-1 bg-blue" 41 | ); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/base/server/api/trpc.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the server-side tRPC API setup 3 | * 4 | * 1. CONTEXT 5 | * This section defines the "contexts" that are available in the backend API. 6 | * These allow you to access things when processing a request, like the database or session. 7 | */ 8 | import { initTRPC } from "@trpc/server"; 9 | import superjson from "superjson"; 10 | import { ZodError } from "zod"; 11 | import { db } from "@/server/db"; 12 | 13 | export const createTRPCContext = async (opts: { headers: Headers }) => { 14 | return { 15 | db, 16 | ...opts, 17 | }; 18 | }; 19 | 20 | /** 21 | * 2. INITIALIZATION 22 | * This is where the tRPC API is initialized, connecting the context and transformer. 23 | */ 24 | const t = initTRPC.context().create({ 25 | transformer: superjson, 26 | errorFormatter({ shape, error }) { 27 | return { 28 | ...shape, 29 | data: { 30 | ...shape.data, 31 | zodError: error.cause instanceof ZodError ? error.cause.flatten() : null, 32 | }, 33 | }; 34 | }, 35 | }); 36 | 37 | /** 38 | * Create a server-side caller 39 | */ 40 | export const createCallerFactory = t.createCallerFactory; 41 | 42 | /** 43 | * 3. ROUTER & PROCEDURE 44 | * These are the pieces you use to build your tRPC API. You should import these a lot. 45 | */ 46 | export const createTRPCRouter = t.router; 47 | 48 | /** 49 | * Public (unauthenticated) procedure 50 | */ 51 | export const publicProcedure = t.procedure; 52 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/lib/__tests__/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { cn } from "../utils"; 2 | 3 | describe("cn utility function", () => { 4 | it("merges class names correctly", () => { 5 | expect(cn("px-2 py-1", "bg-blue-500")).toBe("px-2 py-1 bg-blue-500"); 6 | }); 7 | 8 | it("handles conditional classes", () => { 9 | const isActive = false; 10 | const isHighlighted = true; 11 | expect(cn("px-2", isActive && "py-1")).toBe("px-2"); 12 | expect(cn("px-2", isHighlighted && "py-1")).toBe("px-2 py-1"); 13 | }); 14 | 15 | it("handles undefined and null values", () => { 16 | expect(cn("px-2", undefined, null, "py-1")).toBe("px-2 py-1"); 17 | }); 18 | 19 | it("merges conflicting Tailwind classes correctly", () => { 20 | expect(cn("px-2", "px-4")).toBe("px-4"); 21 | expect(cn("text-red-500", "text-blue-500")).toBe("text-blue-500"); 22 | }); 23 | 24 | it("handles empty inputs", () => { 25 | expect(cn()).toBe(""); 26 | expect(cn("")).toBe(""); 27 | }); 28 | 29 | it("handles array inputs", () => { 30 | expect(cn(["px-2", "py-1"])).toBe("px-2 py-1"); 31 | }); 32 | 33 | it("handles object inputs with boolean values", () => { 34 | expect(cn({ "px-2": true, "py-1": false, "bg-blue": true })).toBe("px-2 bg-blue"); 35 | }); 36 | 37 | it("combines multiple types of inputs", () => { 38 | const isHidden = false; 39 | expect(cn("px-2", { "py-1": true }, ["bg-blue"], isHidden && "hidden")).toBe( 40 | "px-2 py-1 bg-blue" 41 | ); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /src/solokit/init/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Solokit Init Module 3 | 4 | This module contains deterministic scripts for template-based project initialization. 5 | Each script handles a specific phase of the initialization process. 6 | 7 | Module Organization: 8 | - git_setup.py: Git initialization and verification 9 | - environment_validator.py: Environment validation with auto-update (pyenv, nvm) 10 | - template_installer.py: Template file copying and installation 11 | - readme_generator.py: README.md generation 12 | - config_generator.py: Config file generation (.eslintrc, .prettierrc, etc.) 13 | - dependency_installer.py: Dependency installation (npm/pip) 14 | - docs_structure.py: Documentation directory creation 15 | - code_generator.py: Minimal code generation 16 | - test_generator.py: Smoke test generation 17 | - env_generator.py: Environment file generation (.env.example) 18 | - session_structure.py: Session structure initialization 19 | - initial_scans.py: Initial scans (stack.txt, tree.txt) 20 | - git_hooks.py: Git hooks installation 21 | - gitignore_updater.py: .gitignore updates 22 | - initial_commit.py: Initial commit creation 23 | """ 24 | 25 | __all__ = [ 26 | "git_setup", 27 | "environment_validator", 28 | "template_installer", 29 | "readme_generator", 30 | "config_generator", 31 | "dependency_installer", 32 | "docs_structure", 33 | "code_generator", 34 | "test_generator", 35 | "env_generator", 36 | "session_structure", 37 | "initial_scans", 38 | "git_hooks", 39 | "gitignore_updater", 40 | "initial_commit", 41 | ] 42 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/core/database.py: -------------------------------------------------------------------------------- 1 | """ 2 | Database configuration and session management 3 | """ 4 | 5 | from collections.abc import AsyncGenerator 6 | 7 | from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine 8 | from sqlmodel import SQLModel 9 | from sqlmodel.ext.asyncio.session import AsyncSession 10 | 11 | from src.core.config import settings 12 | 13 | # Convert postgresql:// to postgresql+asyncpg:// for async support 14 | DATABASE_URL = settings.DATABASE_URL.replace("postgresql://", "postgresql+asyncpg://") 15 | 16 | # Create async engine 17 | engine = create_async_engine( 18 | DATABASE_URL, 19 | echo=settings.DEBUG, 20 | future=True, 21 | ) 22 | 23 | # Create async session maker 24 | async_session_maker = async_sessionmaker( 25 | engine, 26 | class_=AsyncSession, 27 | expire_on_commit=False, 28 | ) 29 | 30 | 31 | async def create_db_and_tables() -> None: 32 | """ 33 | Create all database tables. 34 | In production, use Alembic migrations instead. 35 | """ 36 | async with engine.begin() as conn: 37 | # Import all models here to ensure they are registered 38 | # Example: from src.models import User # noqa: F401 39 | 40 | await conn.run_sync(SQLModel.metadata.create_all) 41 | 42 | 43 | async def get_session() -> AsyncGenerator[AsyncSession, None]: 44 | """ 45 | Get a database session. 46 | 47 | Yields: 48 | AsyncSession: Database session 49 | """ 50 | async with async_session_maker() as session: 51 | yield session 52 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/lib/__tests__/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { cn } from "../utils"; 2 | 3 | describe("cn utility function", () => { 4 | it("merges class names correctly", () => { 5 | expect(cn("px-2 py-1", "bg-blue-500")).toBe("px-2 py-1 bg-blue-500"); 6 | }); 7 | 8 | it("handles conditional classes", () => { 9 | const isActive = false; 10 | const isHighlighted = true; 11 | expect(cn("px-2", isActive && "py-1")).toBe("px-2"); 12 | expect(cn("px-2", isHighlighted && "py-1")).toBe("px-2 py-1"); 13 | }); 14 | 15 | it("handles undefined and null values", () => { 16 | expect(cn("px-2", undefined, null, "py-1")).toBe("px-2 py-1"); 17 | }); 18 | 19 | it("merges conflicting Tailwind classes correctly", () => { 20 | // twMerge should keep the last conflicting class 21 | expect(cn("px-2", "px-4")).toBe("px-4"); 22 | expect(cn("text-red-500", "text-blue-500")).toBe("text-blue-500"); 23 | }); 24 | 25 | it("handles empty inputs", () => { 26 | expect(cn()).toBe(""); 27 | expect(cn("")).toBe(""); 28 | }); 29 | 30 | it("handles array inputs", () => { 31 | expect(cn(["px-2", "py-1"])).toBe("px-2 py-1"); 32 | }); 33 | 34 | it("handles object inputs with boolean values", () => { 35 | expect(cn({ "px-2": true, "py-1": false, "bg-blue": true })).toBe("px-2 bg-blue"); 36 | }); 37 | 38 | it("combines multiple types of inputs", () => { 39 | const isHidden = false; 40 | expect(cn("px-2", { "py-1": true }, ["bg-blue"], isHidden && "hidden")).toBe( 41 | "px-2 py-1 bg-blue" 42 | ); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /src/solokit/core/argparse_helpers.py: -------------------------------------------------------------------------------- 1 | """ 2 | Argparse helpers for improved error messages and user experience. 3 | 4 | This module provides custom argparse classes that enhance the default 5 | error handling with better messaging, examples, and next steps. 6 | """ 7 | 8 | from __future__ import annotations 9 | 10 | import argparse 11 | import sys 12 | from typing import NoReturn 13 | 14 | 15 | class HelpfulArgumentParser(argparse.ArgumentParser): 16 | """ 17 | Custom ArgumentParser that provides helpful error messages. 18 | 19 | This parser extends the default argparse.ArgumentParser to show: 20 | - Friendly error messages with emoji 21 | - Full help text when errors occur 22 | - Better formatting for terminal usage 23 | 24 | Example: 25 | parser = HelpfulArgumentParser( 26 | description="Create a new work item", 27 | epilog=''' 28 | Examples: 29 | sk work-new --type feature --title "Add auth" --priority high 30 | sk work-new -t bug -T "Fix login" -p critical 31 | 32 | Valid types: feature, bug, refactor, security 33 | ''' 34 | ) 35 | """ 36 | 37 | def error(self, message: str) -> NoReturn: 38 | """ 39 | Override error handling to provide helpful messages. 40 | 41 | Args: 42 | message: Error message from argparse 43 | 44 | Exits with code 2 after printing error and help. 45 | """ 46 | sys.stderr.write(f"❌ Error: {message}\n\n") 47 | self.print_help(sys.stderr) 48 | sys.exit(2) 49 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-2-standard/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # Pre-commit hooks for Python/FastAPI project 2 | # See https://pre-commit.com for more information 3 | 4 | repos: 5 | # General file checks 6 | - repo: https://github.com/pre-commit/pre-commit-hooks 7 | rev: v4.5.0 8 | hooks: 9 | - id: trailing-whitespace 10 | - id: end-of-file-fixer 11 | - id: check-yaml 12 | - id: check-added-large-files 13 | args: ["--maxkb=1000"] 14 | - id: check-json 15 | - id: check-toml 16 | - id: check-merge-conflict 17 | - id: detect-private-key 18 | - id: mixed-line-ending 19 | 20 | # Ruff - Fast Python linter (replaces flake8, isort, etc.) 21 | - repo: https://github.com/astral-sh/ruff-pre-commit 22 | rev: v0.9.2 23 | hooks: 24 | # Run the linter 25 | - id: ruff 26 | args: [--fix] 27 | # Run the formatter 28 | - id: ruff-format 29 | 30 | # Bandit - Security linter 31 | - repo: https://github.com/PyCQA/bandit 32 | rev: 1.8.0 33 | hooks: 34 | - id: bandit 35 | args: ["-c", ".bandit", "-r", "src"] 36 | exclude: ^tests/ 37 | 38 | # detect-secrets - Find secrets in code 39 | - repo: https://github.com/Yelp/detect-secrets 40 | rev: v1.5.0 41 | hooks: 42 | - id: detect-secrets 43 | args: ["--baseline", ".secrets.baseline"] 44 | exclude: package.lock.json 45 | 46 | # pyright - Type checker (optional, can be slow) 47 | # - repo: https://github.com/RobertCraigie/pyright-python 48 | # rev: v1.1.396 49 | # hooks: 50 | # - id: pyright 51 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-4-production/.github/workflows/a11y.yml: -------------------------------------------------------------------------------- 1 | name: Accessibility Tests 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | accessibility: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Install Playwright browsers 27 | run: npx playwright install --with-deps 28 | 29 | - name: Build application 30 | run: npm run build 31 | 32 | - name: Run accessibility tests 33 | run: npm run test:a11y 34 | 35 | - name: Upload accessibility report 36 | uses: actions/upload-artifact@v4 37 | if: always() 38 | with: 39 | name: accessibility-report 40 | path: playwright-report/ 41 | retention-days: 30 42 | 43 | - name: Comment PR with accessibility results 44 | if: github.event_name == 'pull_request' && failure() 45 | uses: actions/github-script@v7 46 | with: 47 | script: | 48 | github.rest.issues.createComment({ 49 | issue_number: context.issue.number, 50 | owner: context.repo.owner, 51 | repo: context.repo.repo, 52 | body: '⚠️ Accessibility tests failed. Please review the accessibility report in the workflow artifacts.' 53 | }) 54 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/tier-4-production/.github/workflows/a11y.yml: -------------------------------------------------------------------------------- 1 | name: Accessibility Tests 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | accessibility: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Install Playwright browsers 27 | run: npx playwright install --with-deps 28 | 29 | - name: Build application 30 | run: npm run build 31 | 32 | - name: Run accessibility tests 33 | run: npm run test:a11y 34 | 35 | - name: Upload accessibility report 36 | uses: actions/upload-artifact@v4 37 | if: always() 38 | with: 39 | name: accessibility-report 40 | path: playwright-report/ 41 | retention-days: 30 42 | 43 | - name: Comment PR with accessibility results 44 | if: github.event_name == 'pull_request' && failure() 45 | uses: actions/github-script@v7 46 | with: 47 | script: | 48 | github.rest.issues.createComment({ 49 | issue_number: context.issue.number, 50 | owner: context.repo.owner, 51 | repo: context.repo.repo, 52 | body: '⚠️ Accessibility tests failed. Please review the accessibility report in the workflow artifacts.' 53 | }) 54 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/docker/docker-compose.prod.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | # PostgreSQL database for production 5 | db: 6 | image: postgres:16-alpine 7 | container_name: fullstack-nextjs-db-prod 8 | restart: always 9 | environment: 10 | POSTGRES_USER: ${POSTGRES_USER:-postgres} 11 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 12 | POSTGRES_DB: ${POSTGRES_DB:-mydb} 13 | ports: 14 | - '5432:5432' 15 | volumes: 16 | - postgres_data_prod:/var/lib/postgresql/data 17 | healthcheck: 18 | test: ['CMD-SHELL', 'pg_isready -U postgres'] 19 | interval: 10s 20 | timeout: 5s 21 | retries: 5 22 | networks: 23 | - app_network 24 | 25 | # Next.js application (production) 26 | app: 27 | build: 28 | context: .. 29 | dockerfile: docker/Dockerfile 30 | target: runner 31 | container_name: fullstack-nextjs-app-prod 32 | restart: always 33 | depends_on: 34 | db: 35 | condition: service_healthy 36 | environment: 37 | - NODE_ENV=production 38 | - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-mydb}?schema=public 39 | - SENTRY_DSN=${SENTRY_DSN} 40 | ports: 41 | - '3000:3000' 42 | networks: 43 | - app_network 44 | healthcheck: 45 | test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:3000/'] 46 | interval: 30s 47 | timeout: 10s 48 | retries: 3 49 | start_period: 40s 50 | 51 | volumes: 52 | postgres_data_prod: 53 | driver: local 54 | 55 | networks: 56 | app_network: 57 | driver: bridge 58 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/tier-4-production/.github/workflows/a11y.yml: -------------------------------------------------------------------------------- 1 | name: Accessibility Tests 2 | 3 | on: 4 | pull_request: 5 | branches: [main, develop] 6 | push: 7 | branches: [main, develop] 8 | 9 | jobs: 10 | accessibility: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: '20' 21 | cache: 'npm' 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Install Playwright browsers 27 | run: npx playwright install --with-deps 28 | 29 | - name: Build application 30 | run: npm run build 31 | 32 | - name: Run accessibility tests 33 | run: npm run test:a11y 34 | 35 | - name: Upload accessibility report 36 | uses: actions/upload-artifact@v4 37 | if: always() 38 | with: 39 | name: accessibility-report 40 | path: playwright-report/ 41 | retention-days: 30 42 | 43 | - name: Comment PR with accessibility results 44 | if: github.event_name == 'pull_request' && failure() 45 | uses: actions/github-script@v7 46 | with: 47 | script: | 48 | github.rest.issues.createComment({ 49 | issue_number: context.issue.number, 50 | owner: context.repo.owner, 51 | repo: context.repo.repo, 52 | body: '⚠️ Accessibility tests failed. Please review the accessibility report in the workflow artifacts.' 53 | }) 54 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/tier-4-production/src/core/monitoring.py: -------------------------------------------------------------------------------- 1 | """ 2 | Prometheus metrics setup for monitoring 3 | """ 4 | 5 | from fastapi import Response 6 | from prometheus_client import ( 7 | CONTENT_TYPE_LATEST, 8 | CollectorRegistry, 9 | Counter, 10 | Gauge, 11 | Histogram, 12 | generate_latest, 13 | ) 14 | 15 | # Create a custom registry 16 | registry = CollectorRegistry() 17 | 18 | # Request metrics 19 | http_requests_total = Counter( 20 | "http_requests_total", 21 | "Total HTTP requests", 22 | ["method", "endpoint", "status"], 23 | registry=registry, 24 | ) 25 | 26 | http_request_duration_seconds = Histogram( 27 | "http_request_duration_seconds", 28 | "HTTP request duration in seconds", 29 | ["method", "endpoint"], 30 | registry=registry, 31 | ) 32 | 33 | # Application metrics 34 | active_users = Gauge( 35 | "active_users", 36 | "Number of active users", 37 | registry=registry, 38 | ) 39 | 40 | database_connections = Gauge( 41 | "database_connections", 42 | "Number of active database connections", 43 | registry=registry, 44 | ) 45 | 46 | # Business metrics - add your own counters here 47 | # Example: 48 | # orders_created_total = Counter( 49 | # "orders_created_total", 50 | # "Total number of orders created", 51 | # registry=registry, 52 | # ) 53 | 54 | 55 | def get_metrics() -> Response: 56 | """ 57 | Generate Prometheus metrics response. 58 | 59 | Returns: 60 | Response: Prometheus metrics in text format 61 | """ 62 | metrics = generate_latest(registry) 63 | return Response(content=metrics, media_type=CONTENT_TYPE_LATEST) 64 | -------------------------------------------------------------------------------- /src/solokit/templates/dashboard_refine/base/app/__tests__/loading.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from "@testing-library/react"; 2 | import Loading from "../loading"; 3 | 4 | describe("Loading Component", () => { 5 | it("renders loading text", () => { 6 | render(); 7 | expect(screen.getByText("Loading...")).toBeInTheDocument(); 8 | }); 9 | 10 | it("renders spinner element", () => { 11 | const { container } = render(); 12 | const spinner = container.querySelector(".animate-spin"); 13 | expect(spinner).toBeInTheDocument(); 14 | }); 15 | 16 | it("has centered layout", () => { 17 | const { container } = render(); 18 | const wrapper = container.querySelector("div"); 19 | expect(wrapper).toHaveClass("flex"); 20 | expect(wrapper).toHaveClass("min-h-screen"); 21 | expect(wrapper).toHaveClass("items-center"); 22 | expect(wrapper).toHaveClass("justify-center"); 23 | }); 24 | 25 | it("spinner has rounded border", () => { 26 | const { container } = render(); 27 | const spinner = container.querySelector(".animate-spin"); 28 | expect(spinner).toHaveClass("rounded-full"); 29 | }); 30 | 31 | it("spinner has border styling", () => { 32 | const { container } = render(); 33 | const spinner = container.querySelector(".animate-spin"); 34 | expect(spinner).toHaveClass("border-4"); 35 | }); 36 | 37 | it("has proper size for spinner", () => { 38 | const { container } = render(); 39 | const spinner = container.querySelector(".animate-spin"); 40 | expect(spinner).toHaveClass("h-12"); 41 | expect(spinner).toHaveClass("w-12"); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /src/solokit/session/briefing/stack_detector.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Technology stack detection and information loading. 4 | Part of the briefing module decomposition. 5 | """ 6 | 7 | from __future__ import annotations 8 | 9 | from pathlib import Path 10 | 11 | from solokit.core.error_handlers import log_errors 12 | from solokit.core.exceptions import FileOperationError 13 | from solokit.core.logging_config import get_logger 14 | 15 | logger = get_logger(__name__) 16 | 17 | 18 | class StackDetector: 19 | """Detect and load technology stack information.""" 20 | 21 | def __init__(self, session_dir: Path | None = None): 22 | """Initialize stack detector. 23 | 24 | Args: 25 | session_dir: Path to .session directory (defaults to .session) 26 | """ 27 | self.session_dir = session_dir or Path(".session") 28 | self.stack_file = self.session_dir / "tracking" / "stack.txt" 29 | 30 | @log_errors() 31 | def load_current_stack(self) -> str: 32 | """Load current technology stack. 33 | 34 | Returns: 35 | Stack information as string 36 | 37 | Raises: 38 | FileOperationError: If stack file exists but cannot be read 39 | """ 40 | if not self.stack_file.exists(): 41 | return "Stack not yet generated" 42 | 43 | try: 44 | return self.stack_file.read_text() 45 | except OSError as e: 46 | raise FileOperationError( 47 | operation="read", 48 | file_path=str(self.stack_file), 49 | details=f"Failed to read stack file: {e}", 50 | cause=e, 51 | ) from e 52 | -------------------------------------------------------------------------------- /src/solokit/session/briefing/tree_generator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Project directory tree loading. 4 | Part of the briefing module decomposition. 5 | """ 6 | 7 | from __future__ import annotations 8 | 9 | from pathlib import Path 10 | 11 | from solokit.core.error_handlers import log_errors 12 | from solokit.core.exceptions import FileOperationError 13 | from solokit.core.logging_config import get_logger 14 | 15 | logger = get_logger(__name__) 16 | 17 | 18 | class TreeGenerator: 19 | """Load and generate project directory tree.""" 20 | 21 | def __init__(self, session_dir: Path | None = None): 22 | """Initialize tree generator. 23 | 24 | Args: 25 | session_dir: Path to .session directory (defaults to .session) 26 | """ 27 | self.session_dir = session_dir or Path(".session") 28 | self.tree_file = self.session_dir / "tracking" / "tree.txt" 29 | 30 | @log_errors() 31 | def load_current_tree(self) -> str: 32 | """Load current project structure. 33 | 34 | Returns: 35 | Project tree as string 36 | 37 | Raises: 38 | FileOperationError: If tree file exists but cannot be read 39 | """ 40 | if not self.tree_file.exists(): 41 | return "Tree not yet generated" 42 | 43 | try: 44 | # Return full tree 45 | return self.tree_file.read_text() 46 | except OSError as e: 47 | raise FileOperationError( 48 | operation="read", 49 | file_path=str(self.tree_file), 50 | details=f"Failed to read tree file: {e}", 51 | cause=e, 52 | ) from e 53 | -------------------------------------------------------------------------------- /src/solokit/templates/fullstack_nextjs/base/app/page.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | 3 | /** 4 | * Home Page - Server Component 5 | * 6 | * This is a minimal starting point for your application. 7 | * See ARCHITECTURE.md for patterns on adding features. 8 | */ 9 | export default function Home() { 10 | return ( 11 |
12 |
13 |

14 | Full-Stack Next.js 15 |

16 | 17 |

18 | Your project is ready. Start building from your PRD. 19 |

20 | 21 |
22 | 26 |

Health Check →

27 |
Verify the API is running at /api/health
28 | 29 |
30 |

Get Started

31 |
32 | Read ARCHITECTURE.md for patterns 33 |
34 |
35 |
36 |
37 |
38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/.gitignore: -------------------------------------------------------------------------------- 1 | # Python 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | *.so 6 | .Python 7 | 8 | # Virtual Environments 9 | venv/ 10 | env/ 11 | ENV/ 12 | .venv/ 13 | 14 | # Distribution / packaging 15 | build/ 16 | develop-eggs/ 17 | dist/ 18 | downloads/ 19 | eggs/ 20 | .eggs/ 21 | lib/ 22 | lib64/ 23 | parts/ 24 | sdist/ 25 | var/ 26 | wheels/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | 31 | # PyInstaller 32 | *.manifest 33 | *.spec 34 | 35 | # Testing 36 | .pytest_cache/ 37 | .coverage 38 | .coverage.* 39 | htmlcov/ 40 | .tox/ 41 | .nox/ 42 | coverage.xml 43 | *.cover 44 | .hypothesis/ 45 | .mutmut-cache/ 46 | 47 | # MyPy / Pyright 48 | .mypy_cache/ 49 | .dmypy.json 50 | dmypy.json 51 | .pytype/ 52 | pyrightconfig.json.user 53 | 54 | # Ruff 55 | .ruff_cache/ 56 | 57 | # IDEs 58 | .vscode/ 59 | .idea/ 60 | *.swp 61 | *.swo 62 | *~ 63 | .DS_Store 64 | 65 | # Environment variables 66 | .env 67 | .env.local 68 | .env.*.local 69 | 70 | # Database 71 | *.db 72 | *.sqlite 73 | *.sqlite3 74 | 75 | # Alembic 76 | alembic/versions/*.py 77 | !alembic/versions/.gitkeep 78 | 79 | # Logs 80 | logs/ 81 | *.log 82 | 83 | # Jupyter Notebook 84 | .ipynb_checkpoints 85 | 86 | # pyenv 87 | .python-version.local 88 | 89 | # Celery 90 | celerybeat-schedule 91 | celerybeat.pid 92 | 93 | # SageMath parsed files 94 | *.sage.py 95 | 96 | # Profiling 97 | .prof 98 | 99 | # Security 100 | # Note: .secrets.baseline should be tracked in git (it's the baseline for detect-secrets) 101 | 102 | # Local development 103 | .DS_Store 104 | Thumbs.db 105 | 106 | # Solokit session tracking 107 | .session/ 108 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/docker/docker-compose.prod.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | # PostgreSQL database for production 5 | db: 6 | image: postgres:16-alpine 7 | container_name: saas-t3-db-prod 8 | restart: always 9 | environment: 10 | POSTGRES_USER: ${POSTGRES_USER:-postgres} 11 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 12 | POSTGRES_DB: ${POSTGRES_DB:-mydb} 13 | ports: 14 | - '5432:5432' 15 | volumes: 16 | - postgres_data_prod:/var/lib/postgresql/data 17 | healthcheck: 18 | test: ['CMD-SHELL', 'pg_isready -U postgres'] 19 | interval: 10s 20 | timeout: 5s 21 | retries: 5 22 | networks: 23 | - app_network 24 | 25 | # Next.js application (production) 26 | app: 27 | build: 28 | context: .. 29 | dockerfile: docker/Dockerfile 30 | target: runner 31 | container_name: saas-t3-app-prod 32 | restart: always 33 | depends_on: 34 | db: 35 | condition: service_healthy 36 | environment: 37 | - NODE_ENV=production 38 | - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-mydb}?schema=public 39 | - NEXTAUTH_SECRET=${NEXTAUTH_SECRET} 40 | - NEXTAUTH_URL=${NEXTAUTH_URL} 41 | - SENTRY_DSN=${SENTRY_DSN} 42 | ports: 43 | - '3000:3000' 44 | networks: 45 | - app_network 46 | healthcheck: 47 | test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:3000/'] 48 | interval: 30s 49 | timeout: 10s 50 | retries: 3 51 | start_period: 40s 52 | 53 | volumes: 54 | postgres_data_prod: 55 | driver: local 56 | 57 | networks: 58 | app_network: 59 | driver: bridge 60 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # Multi-stage Dockerfile for FastAPI application 2 | # Stage 1: Builder - Install dependencies 3 | FROM python:3.11-slim as builder 4 | 5 | WORKDIR /app 6 | 7 | # Install build dependencies 8 | RUN apt-get update && apt-get install -y \ 9 | gcc \ 10 | postgresql-client \ 11 | && rm -rf /var/lib/apt/lists/* 12 | 13 | # Copy requirements first for better caching 14 | COPY requirements.txt . 15 | 16 | # Create virtual environment and install dependencies 17 | RUN python -m venv /opt/venv 18 | ENV PATH="/opt/venv/bin:$PATH" 19 | RUN pip install --no-cache-dir --upgrade pip && \ 20 | pip install --no-cache-dir -r requirements.txt 21 | 22 | # Stage 2: Runner - Production image 23 | FROM python:3.11-slim 24 | 25 | WORKDIR /app 26 | 27 | # Install runtime dependencies 28 | RUN apt-get update && apt-get install -y \ 29 | postgresql-client \ 30 | curl \ 31 | && rm -rf /var/lib/apt/lists/* 32 | 33 | # Copy virtual environment from builder 34 | COPY --from=builder /opt/venv /opt/venv 35 | 36 | # Set environment variables 37 | ENV PATH="/opt/venv/bin:$PATH" \ 38 | PYTHONUNBUFFERED=1 \ 39 | PYTHONDONTWRITEBYTECODE=1 40 | 41 | # Copy application code 42 | COPY src/ ./src/ 43 | COPY alembic/ ./alembic/ 44 | COPY alembic.ini . 45 | 46 | # Create non-root user 47 | RUN useradd -m -u 1000 appuser && \ 48 | chown -R appuser:appuser /app 49 | USER appuser 50 | 51 | # Expose port 52 | EXPOSE 8000 53 | 54 | # Health check 55 | HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ 56 | CMD curl -f http://localhost:8000/health || exit 1 57 | 58 | # Run the application 59 | CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"] 60 | -------------------------------------------------------------------------------- /src/solokit/templates/saas_t3/tier-3-comprehensive/tests/e2e/home.spec.ts: -------------------------------------------------------------------------------- 1 | import { test, expect } from "@playwright/test"; 2 | import AxeBuilder from "@axe-core/playwright"; 3 | 4 | test.describe("Home Page", () => { 5 | test("should load the home page", async ({ page }) => { 6 | await page.goto("/"); 7 | 8 | // Check for the main heading 9 | await expect(page.getByRole("heading", { name: /welcome to.*t3/i })).toBeVisible(); 10 | }); 11 | 12 | test("should display getting started message", async ({ page }) => { 13 | await page.goto("/"); 14 | 15 | // Check for the getting started text 16 | await expect(page.getByText(/your t3 stack application is ready/i)).toBeVisible(); 17 | }); 18 | 19 | test("should have no accessibility violations @a11y", async ({ page }) => { 20 | await page.goto("/"); 21 | 22 | // Run accessibility scan 23 | // Cast page to any to avoid type conflict between @playwright/test and @axe-core/playwright 24 | const accessibilityScanResults = await new AxeBuilder({ page } as any) 25 | .withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"]) 26 | .analyze(); 27 | 28 | // Assert no accessibility violations 29 | expect(accessibilityScanResults.violations).toEqual([]); 30 | }); 31 | 32 | test("should show guidance about architecture", async ({ page }) => { 33 | await page.goto("/"); 34 | 35 | // Check that guidance text is visible 36 | await expect(page.getByText(/read architecture\.md/i)).toBeVisible(); 37 | }); 38 | 39 | test("should show guidance about PRD", async ({ page }) => { 40 | await page.goto("/"); 41 | 42 | // Check that PRD guidance is visible 43 | await expect(page.getByText(/create your prd/i)).toBeVisible(); 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /.claude/commands/learn-show.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Browse and filter learnings 3 | argument-hint: [--category CATEGORY] [--tag TAG] [--session SESSION] 4 | --- 5 | 6 | # Show Learnings 7 | 8 | View captured learnings with optional filtering. 9 | 10 | ## Usage 11 | 12 | Parse $ARGUMENTS for filters and run the show-learnings command: 13 | 14 | ```bash 15 | sk learn-show "$@" 16 | ``` 17 | 18 | ### Filter Options 19 | 20 | - `--category ` - Filter by category: 21 | - `architecture_patterns` - Design decisions and patterns 22 | - `gotchas` - Edge cases and pitfalls 23 | - `best_practices` - Effective approaches 24 | - `technical_debt` - Areas needing improvement 25 | - `performance_insights` - Optimization learnings 26 | - `security` - Security-related discoveries 27 | 28 | - `--tag ` - Filter by specific tag (e.g., `python`, `fastapi`, `cors`) 29 | 30 | - `--session ` - Show learnings from specific session number 31 | 32 | ### Examples 33 | 34 | Show all learnings: 35 | 36 | ```bash 37 | sk learn-show 38 | ``` 39 | 40 | Show only gotchas: 41 | 42 | ```bash 43 | sk learn-show --category gotchas 44 | ``` 45 | 46 | Show learnings tagged with "fastapi": 47 | 48 | ```bash 49 | sk learn-show --tag fastapi 50 | ``` 51 | 52 | Show learnings from session 5: 53 | 54 | ```bash 55 | sk learn-show --session 5 56 | ``` 57 | 58 | Combine filters (gotchas from session 5): 59 | 60 | ```bash 61 | sk learn-show --category gotchas --session 5 62 | ``` 63 | 64 | ## Display Format 65 | 66 | The command will display learnings in organized format showing: 67 | 68 | - Category grouping 69 | - Learning content 70 | - Tags (if any) 71 | - Session number where captured 72 | - Timestamp 73 | - Learning ID 74 | 75 | Present the output to the user in a clear, readable format. 76 | -------------------------------------------------------------------------------- /src/solokit/templates/ml_ai_fastapi/base/src/api/routes/health.py: -------------------------------------------------------------------------------- 1 | """ 2 | Health check endpoints for monitoring and load balancers 3 | """ 4 | 5 | from fastapi import APIRouter, Depends 6 | from sqlmodel import text 7 | from sqlmodel.ext.asyncio.session import AsyncSession 8 | 9 | from src.api.dependencies import get_db 10 | from src.core.config import settings 11 | 12 | router = APIRouter() 13 | 14 | 15 | @router.get("/health") 16 | async def health_check() -> dict[str, str]: 17 | """ 18 | Basic health check endpoint. 19 | 20 | Returns: 21 | dict: Health status 22 | """ 23 | return { 24 | "status": "healthy", 25 | "service": settings.APP_NAME, 26 | "version": settings.APP_VERSION, 27 | } 28 | 29 | 30 | @router.get("/health/ready") 31 | async def readiness_check(db: AsyncSession = Depends(get_db)) -> dict[str, str]: # noqa: B008 32 | """ 33 | Readiness check - verifies database connectivity. 34 | 35 | Args: 36 | db: Database session 37 | 38 | Returns: 39 | dict: Readiness status 40 | """ 41 | try: 42 | # Test database connection 43 | await db.execute(text("SELECT 1")) 44 | except Exception as e: 45 | return { 46 | "status": "not ready", 47 | "database": "disconnected", 48 | "error": str(e), 49 | } 50 | else: 51 | return { 52 | "status": "ready", 53 | "database": "connected", 54 | } 55 | 56 | 57 | @router.get("/health/live") 58 | async def liveness_check() -> dict[str, str]: 59 | """ 60 | Liveness check - verifies the application is running. 61 | 62 | Returns: 63 | dict: Liveness status 64 | """ 65 | return { 66 | "status": "alive", 67 | } 68 | --------------------------------------------------------------------------------