create-atsdc-stack 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/CLAUDE.md +236 -0
  3. package/CONTRIBUTING.md +342 -342
  4. package/INSTALLATION.md +359 -359
  5. package/LICENSE +201 -201
  6. package/README.md +405 -405
  7. package/app/.env.example +17 -17
  8. package/app/.github/labeler.yml +61 -0
  9. package/app/.github/workflows/browser-tests.yml +101 -0
  10. package/app/.github/workflows/check.yml +24 -0
  11. package/app/.github/workflows/greetings.yml +16 -0
  12. package/app/.github/workflows/label.yml +22 -0
  13. package/app/.github/workflows/stale.yml +27 -0
  14. package/app/.github/workflows/summary.yml +34 -0
  15. package/app/.stylelintrc.json +8 -0
  16. package/app/README.md +251 -251
  17. package/app/astro.config.mjs +83 -83
  18. package/app/drizzle.config.ts +16 -16
  19. package/app/package.json +66 -52
  20. package/app/playwright.config.ts +27 -0
  21. package/app/public/manifest.webmanifest +36 -36
  22. package/app/pwa-assets.config.ts +8 -0
  23. package/app/src/components/Card.astro +36 -36
  24. package/app/src/db/initialize.ts +107 -107
  25. package/app/src/db/schema.ts +72 -72
  26. package/app/src/db/validations.ts +158 -158
  27. package/app/src/layouts/Layout.astro +63 -63
  28. package/app/src/lib/config.ts +36 -36
  29. package/app/src/lib/content-converter.ts +141 -141
  30. package/app/src/lib/dom-utils.ts +230 -230
  31. package/app/src/lib/exa-search.ts +269 -269
  32. package/app/src/pages/api/chat.ts +91 -91
  33. package/app/src/pages/api/posts.ts +350 -350
  34. package/app/src/pages/index.astro +87 -87
  35. package/app/src/styles/components/button.scss +152 -152
  36. package/app/src/styles/components/card.scss +180 -180
  37. package/app/src/styles/components/form.scss +240 -240
  38. package/app/src/styles/global.scss +141 -141
  39. package/app/src/styles/pages/index.scss +80 -80
  40. package/app/src/styles/reset.scss +83 -83
  41. package/app/src/styles/variables/globals.scss +96 -96
  42. package/app/src/styles/variables/mixins.scss +238 -238
  43. package/app/tests/browser.test.nopause.ts +10 -0
  44. package/app/tests/browser.test.ts +13 -0
  45. package/bin/cli.js +1151 -1138
  46. package/package.json +8 -6
  47. package/app/.astro/settings.json +0 -5
  48. package/app/.astro/types.d.ts +0 -1
package/app/.env.example CHANGED
@@ -1,17 +1,17 @@
1
- # Database
2
- DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
3
-
4
- # Clerk Authentication
5
- PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
6
- CLERK_SECRET_KEY="sk_test_..."
7
-
8
- # OpenAI and other AI model providers (for Vercel AI SDK)
9
- OPENAI_API_KEY="sk-..."
10
-
11
- # Exa Search (for AI-powered search)
12
- EXA_API_KEY="..."
13
-
14
- # Vercel (for deployment)
15
- # These are automatically set by Vercel
16
- # VERCEL_URL
17
- # VERCEL_ENV
1
+ # Database
2
+ DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
3
+
4
+ # Clerk Authentication
5
+ PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
6
+ CLERK_SECRET_KEY="sk_test_..."
7
+
8
+ # OpenAI and other AI model providers (for Vercel AI SDK)
9
+ OPENAI_API_KEY="sk-..."
10
+
11
+ # Exa Search (for AI-powered search)
12
+ EXA_API_KEY="..."
13
+
14
+ # Vercel (for deployment)
15
+ # These are automatically set by Vercel
16
+ # VERCEL_URL
17
+ # VERCEL_ENV
@@ -0,0 +1,61 @@
1
+ # Configuration for actions/labeler
2
+ # Labels PRs based on the paths of changed files
3
+
4
+ frontend:
5
+ - changed-files:
6
+ - any-glob-to-any-file:
7
+ - 'src/pages/**/*'
8
+ - 'src/components/**/*'
9
+ - 'src/layouts/**/*'
10
+ - 'src/styles/**/*'
11
+ - 'src/scripts/**/*'
12
+
13
+ api:
14
+ - changed-files:
15
+ - any-glob-to-any-file:
16
+ - 'src/pages/api/**/*'
17
+
18
+ auth:
19
+ - changed-files:
20
+ - any-glob-to-any-file:
21
+ - 'src/lib/auth/**/*'
22
+ - 'src/lib/auth.ts'
23
+ - 'src/db/auth-schema.ts'
24
+ - 'src/pages/user/**/*'
25
+
26
+ database:
27
+ - changed-files:
28
+ - any-glob-to-any-file:
29
+ - 'src/db/**/*'
30
+ - 'drizzle.config.ts'
31
+
32
+ ai:
33
+ - changed-files:
34
+ - any-glob-to-any-file:
35
+ - 'src/lib/ai-service.ts'
36
+ - 'src/lib/models.ts'
37
+ - 'src/lib/tools/**/*'
38
+
39
+ content-generation:
40
+ - changed-files:
41
+ - any-glob-to-any-file:
42
+ - 'src/lib/content/**/*'
43
+
44
+ config:
45
+ - changed-files:
46
+ - any-glob-to-any-file:
47
+ - 'src/lib/config.ts'
48
+ - 'astro.config.mjs'
49
+ - 'tsconfig.json'
50
+ - 'package.json'
51
+
52
+ dependencies:
53
+ - changed-files:
54
+ - any-glob-to-any-file:
55
+ - 'package.json'
56
+ - 'package-lock.json'
57
+
58
+ ci:
59
+ - changed-files:
60
+ - any-glob-to-any-file:
61
+ - '.github/**/*'
@@ -0,0 +1,101 @@
1
+ name: Browser Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ inputs:
10
+ browser_test_path:
11
+ description: 'Path to test (e.g., /user/sign-in)'
12
+ required: false
13
+ default: '/'
14
+
15
+ env:
16
+ DATABASE_URL: ${{ secrets.DATABASE_URL }}
17
+ PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_CLERK_PUBLISHABLE_KEY }}
18
+ CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
19
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
20
+ GOOGLE_GENERATIVE_AI_API_KEY: ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
21
+ EXA_API_KEY: ${{ secrets.EXA_API_KEY }}
22
+ BROWSER_TEST_PATH: ${{ github.event.inputs.browser_test_path || '/' }}
23
+
24
+ jobs:
25
+ test-chrome:
26
+ name: Chrome
27
+ runs-on: ubuntu-latest
28
+ timeout-minutes: 10
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: actions/setup-node@v4
32
+ with:
33
+ node-version: '20'
34
+ cache: 'npm'
35
+ - run: npm ci
36
+ - run: npx playwright install --with-deps chromium
37
+ - name: Start dev server
38
+ run: npm run dev &
39
+ - name: Wait for server
40
+ run: |
41
+ npx wait-on tcp:4321 --timeout 60000
42
+ sleep 5
43
+ - run: npm run test:nopause:chrome
44
+ - uses: actions/upload-artifact@v4
45
+ if: failure()
46
+ with:
47
+ name: playwright-report-chrome
48
+ path: playwright-report/
49
+ retention-days: 7
50
+
51
+ test-firefox:
52
+ name: Firefox
53
+ runs-on: ubuntu-latest
54
+ timeout-minutes: 10
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - uses: actions/setup-node@v4
58
+ with:
59
+ node-version: '20'
60
+ cache: 'npm'
61
+ - run: npm ci
62
+ - run: npx playwright install --with-deps firefox
63
+ - name: Start dev server
64
+ run: npm run dev &
65
+ - name: Wait for server
66
+ run: |
67
+ npx wait-on tcp:4321 --timeout 60000
68
+ sleep 5
69
+ - run: npm run test:nopause:firefox
70
+ - uses: actions/upload-artifact@v4
71
+ if: failure()
72
+ with:
73
+ name: playwright-report-firefox
74
+ path: playwright-report/
75
+ retention-days: 7
76
+
77
+ test-safari:
78
+ name: Safari
79
+ runs-on: ubuntu-latest
80
+ timeout-minutes: 10
81
+ steps:
82
+ - uses: actions/checkout@v4
83
+ - uses: actions/setup-node@v4
84
+ with:
85
+ node-version: '20'
86
+ cache: 'npm'
87
+ - run: npm ci
88
+ - run: npx playwright install --with-deps webkit
89
+ - name: Start dev server
90
+ run: npm run dev &
91
+ - name: Wait for server
92
+ run: |
93
+ npx wait-on tcp:4321 --timeout 60000
94
+ sleep 5
95
+ - run: npm run test:nopause:safari
96
+ - uses: actions/upload-artifact@v4
97
+ if: failure()
98
+ with:
99
+ name: playwright-report-safari
100
+ path: playwright-report/
101
+ retention-days: 7
@@ -0,0 +1,24 @@
1
+ name: Check
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ check:
11
+ name: Astro Check & Stylelint
12
+ runs-on: ubuntu-latest
13
+ timeout-minutes: 5
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: '20'
19
+ cache: 'npm'
20
+ - run: npm ci
21
+ - name: Astro Check
22
+ run: npx astro check
23
+ - name: Stylelint
24
+ run: npx stylelint "src/**/*.scss"
@@ -0,0 +1,16 @@
1
+ name: Greetings
2
+
3
+ on: [pull_request_target, issues]
4
+
5
+ jobs:
6
+ greeting:
7
+ runs-on: ubuntu-latest
8
+ permissions:
9
+ issues: write
10
+ pull-requests: write
11
+ steps:
12
+ - uses: actions/first-interaction@v1
13
+ with:
14
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
15
+ issue-message: "Message that will be displayed on users' first issue"
16
+ pr-message: "Message that will be displayed on users' first pull request"
@@ -0,0 +1,22 @@
1
+ # This workflow will triage pull requests and apply a label based on the
2
+ # paths that are modified in the pull request.
3
+ #
4
+ # To use this workflow, you will need to set up a .github/labeler.yml
5
+ # file with configuration. For more information, see:
6
+ # https://github.com/actions/labeler
7
+
8
+ name: Labeler
9
+ on: [pull_request_target]
10
+
11
+ jobs:
12
+ label:
13
+
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ pull-requests: write
18
+
19
+ steps:
20
+ - uses: actions/labeler@v4
21
+ with:
22
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -0,0 +1,27 @@
1
+ # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2
+ #
3
+ # You can adjust the behavior by modifying this file.
4
+ # For more information, see:
5
+ # https://github.com/actions/stale
6
+ name: Mark stale issues and pull requests
7
+
8
+ on:
9
+ schedule:
10
+ - cron: '28 20 * * *'
11
+
12
+ jobs:
13
+ stale:
14
+
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ issues: write
18
+ pull-requests: write
19
+
20
+ steps:
21
+ - uses: actions/stale@v5
22
+ with:
23
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
24
+ stale-issue-message: 'Stale issue message'
25
+ stale-pr-message: 'Stale pull request message'
26
+ stale-issue-label: 'no-issue-activity'
27
+ stale-pr-label: 'no-pr-activity'
@@ -0,0 +1,34 @@
1
+ name: Summarize new issues
2
+
3
+ on:
4
+ issues:
5
+ types: [opened]
6
+
7
+ jobs:
8
+ summary:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ issues: write
12
+ models: read
13
+ contents: read
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Run AI inference
20
+ id: inference
21
+ uses: actions/ai-inference@v1
22
+ with:
23
+ prompt: |
24
+ Summarize the following GitHub issue in one paragraph:
25
+ Title: ${{ github.event.issue.title }}
26
+ Body: ${{ github.event.issue.body }}
27
+
28
+ - name: Comment with AI summary
29
+ run: |
30
+ gh issue comment $ISSUE_NUMBER --body '${{ steps.inference.outputs.response }}'
31
+ env:
32
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
34
+ RESPONSE: ${{ steps.inference.outputs.response }}
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "stylelint-config-standard-scss",
3
+ "rules": {
4
+ "property-no-vendor-prefix": [true, {
5
+ "ignoreProperties": ["-webkit-backdrop-filter"]
6
+ }]
7
+ }
8
+ }