Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
66281dc
Merge pull request #51 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Mar 31, 2026
2f98745
Merge pull request #52 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Mar 31, 2026
37fe499
Merge pull request #53 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 5, 2026
c77f70d
Merge pull request #55 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 6, 2026
365c5a3
Merge pull request #57 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 6, 2026
9242cbc
Merge pull request #60 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 6, 2026
31f859a
Merge pull request #62 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 6, 2026
1a0de95
Merge pull request #64 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 6, 2026
b30151f
Merge pull request #66 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 6, 2026
0288a30
Merge pull request #67 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 7, 2026
5f59530
Merge pull request #68 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 7, 2026
dad2f9f
Merge pull request #69 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 8, 2026
1cbab16
Merge pull request #70 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 8, 2026
a629cba
Merge pull request #72 from Abdulmuiz44/codex/ui-redesign
Abdulmuiz44 Apr 9, 2026
5bf3858
Add SOUL.md with Boil the ocean manifesto
Abdulmuiz44 Apr 13, 2026
5ca55af
Merge pull request #73 from Abdulmuiz44/codex/create-soul.md-file-in-…
Abdulmuiz44 Apr 13, 2026
6fbfbab
build-tera-mobile-foundation
Apr 18, 2026
03b43ff
Merge pull request #74 from Abdulmuiz44/codex/tera-mobile-foundation
Abdulmuiz44 Apr 18, 2026
16eb990
upgrade-tera-mobile-to-sdk-54
Apr 18, 2026
b25e3cd
FUpgraded to SDK 54
Apr 18, 2026
9897954
Merge pull request #75 from Abdulmuiz44/codex/upgrade-tera-mobile-sdk-54
Abdulmuiz44 Apr 18, 2026
a08db90
Fix chat persistence fallback and harden admin analytics queries
Apr 27, 2026
adbb57c
Analytics issue
Apr 27, 2026
790bb13
Merge pull request #76 from Abdulmuiz44/codex/upgrade-tera-mobile-sdk-54
Abdulmuiz44 Apr 27, 2026
aeaad8a
Remove web search and use grokipedia
Apr 27, 2026
23cba63
Merge pull request #77 from Abdulmuiz44/codex/upgrade-tera-mobile-sdk-54
Abdulmuiz44 Apr 27, 2026
a7e329a
Harden profile usage accounting
Apr 28, 2026
580136a
Add admin health checks and dynamic route fixes
Apr 29, 2026
93ba2d3
Merge pull request #78 from Abdulmuiz44/codex/upgrade-tera-mobile-sdk-54
Abdulmuiz44 Apr 29, 2026
c0e6705
Grant users fresh monthly credits
Apr 29, 2026
1fbfec5
Merge pull request #79 from Abdulmuiz44/codex/grant-existing-users-fr…
Abdulmuiz44 Apr 29, 2026
417570d
Use scaled credit formula for AI usage
Apr 29, 2026
f1332b2
Add Resend product update broadcasts
Apr 29, 2026
c42dbed
Merge pull request #80 from Abdulmuiz44/codex/grant-existing-users-fr…
Abdulmuiz44 Apr 29, 2026
0034e6f
Update Resend sender default
Apr 29, 2026
bd02275
Automate product update emails on deploy
Apr 29, 2026
3563797
Implement important transactional emails
May 1, 2026
a77a176
Merge pull request #81 from Abdulmuiz44/codex/important-transactional…
Abdulmuiz44 May 1, 2026
65868bb
Reduce credit usage rate and reset limits
May 1, 2026
ac80ce4
Merge pull request #82 from Abdulmuiz44/codex/important-transactional…
Abdulmuiz44 May 1, 2026
fd5f785
Make free credits last much longer
May 6, 2026
3687f39
Merge branch 'main' into codex/extend-free-credit-usage
Abdulmuiz44 May 6, 2026
1d6e3c7
Merge pull request #83 from Abdulmuiz44/codex/extend-free-credit-usage
Abdulmuiz44 May 6, 2026
f60d3a2
Retry Netlify build after credit formula fix
May 6, 2026
13dbd1f
Fix duplicated free credit constant
May 7, 2026
ca1d380
Improve email branding and fix usage copy
May 7, 2026
7f23fba
Sync credit usage copy with formula
May 7, 2026
a13142d
Merge pull request #84 from Abdulmuiz44/codex/extend-free-credit-usage
Abdulmuiz44 May 7, 2026
76865ea
Fix chat generation server action lookup
Abdulmuiz44 May 7, 2026
0d1cd23
Merge pull request #86 from Abdulmuiz44/codex/fix-server-action-not-f…
Abdulmuiz44 May 7, 2026
61fb271
Fix duplicate credit token constant build error
Abdulmuiz44 May 7, 2026
c17290c
Merge pull request #87 from Abdulmuiz44/codex/fix-server-action-not-f…
Abdulmuiz44 May 7, 2026
1de1673
Wire mobile home into mock conversations
May 7, 2026
e8be7a7
Add shared chat modes config
Abdulmuiz44 May 7, 2026
5332d66
Merge pull request #88 from Abdulmuiz44/codex/create-chat-modes-share…
Abdulmuiz44 May 7, 2026
e5ce709
Add prompt shell chat mode handling
Abdulmuiz44 May 7, 2026
18fcdd7
Merge pull request #89 from Abdulmuiz44/codex/update-promptshell-with…
Abdulmuiz44 May 7, 2026
4df3937
Add chat mode picker
Abdulmuiz44 May 7, 2026
a40608d
Merge pull request #90 from Abdulmuiz44/codex/create-chatmodepicker-c…
Abdulmuiz44 May 7, 2026
f1ca1cd
Add chat mode to generate props
Abdulmuiz44 May 7, 2026
1af48f4
Merge branch 'main' into codex/update-generate-types.ts-for-chatmode
Abdulmuiz44 May 7, 2026
62752dd
Merge pull request #91 from Abdulmuiz44/codex/update-generate-types.t…
Abdulmuiz44 May 7, 2026
ebc0c06
Handle image chat mode in generate API
Abdulmuiz44 May 7, 2026
174a370
Merge branch 'main' into codex/update-route.ts-for-chat-mode-handling
Abdulmuiz44 May 7, 2026
f0a1f6e
Merge pull request #92 from Abdulmuiz44/codex/update-route.ts-for-cha…
Abdulmuiz44 May 7, 2026
c7af10f
Add chat mode prompts to Mistral responses
Abdulmuiz44 May 7, 2026
3de8314
Merge pull request #93 from Abdulmuiz44/codex/update-generateteacherr…
Abdulmuiz44 May 7, 2026
8dcc44a
Add defensive image chat mode handling
Abdulmuiz44 May 7, 2026
61ba873
Merge branch 'main' into codex/update-chat-mode-handling-in-generate-…
Abdulmuiz44 May 7, 2026
4e7b929
Merge pull request #94 from Abdulmuiz44/codex/update-chat-mode-handli…
Abdulmuiz44 May 7, 2026
0386436
Persist chat mode metadata
Abdulmuiz44 May 7, 2026
877ff6b
Merge branch 'main' into codex/update-supabase-schema-for-chat-sessions
Abdulmuiz44 May 7, 2026
3d419cf
Merge pull request #95 from Abdulmuiz44/codex/update-supabase-schema-…
Abdulmuiz44 May 7, 2026
7e38362
Add note saving for study responses
Abdulmuiz44 May 7, 2026
a8fc38a
Merge branch 'main' into codex/update-message-metadata-and-add-save-n…
Abdulmuiz44 May 7, 2026
b594bb0
Merge pull request #96 from Abdulmuiz44/codex/update-message-metadata…
Abdulmuiz44 May 7, 2026
aa0c114
docs: add chat learning modes overview
Abdulmuiz44 May 7, 2026
7628e58
Merge pull request #97 from Abdulmuiz44/codex/update-readme-with-chat…
Abdulmuiz44 May 7, 2026
059f415
feat: add Blockchain Lab - educational blockchain simulator
invalid-email-address May 11, 2026
f52f794
Merge pull request #98 from Abdulmuiz44/feature/blockchain-lab
Abdulmuiz44 May 11, 2026
92ad9c2
Add usage ledger backbone for credits and analytics
May 14, 2026
575c7a2
Merge branch 'codex/extend-free-credit-usage'
May 14, 2026
57bd604
Refine Tera response style
May 15, 2026
09918fc
Merge branch 'main' into codex/extend-free-credit-usage
Abdulmuiz44 May 15, 2026
ac7566d
Tune Tera mode-specific responses
May 15, 2026
1af9d28
Tune Tera mode-specific responses
May 15, 2026
92f7a86
Wire explicit chat modes through generation
May 16, 2026
9ab1387
Unify chat mode handling for generation
May 16, 2026
53e26c7
Add Cloudflare Workers deployment workflow
May 22, 2026
6f95c2a
Add Cloudflare Workers deployment workflow
May 22, 2026
ac89a7e
Merge branch 'main' into codex/cloudflare-deploy
Abdulmuiz44 May 22, 2026
999d4e7
Merge pull request #100 from Abdulmuiz44/codex/cloudflare-deploy
Abdulmuiz44 May 22, 2026
f7e039f
Finish Cloudflare Workers deployment setup
May 23, 2026
deb2451
Merge pull request #101 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 23, 2026
b320e18
Fix Next.js 16 Turbopack build error for Cloudflare deployment
May 23, 2026
82157df
Merge pull request #102 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 23, 2026
09ed97c
Fix Turbopack build errors - bad merge artifacts
May 23, 2026
33dc8a8
Send backend chatMode enum instead of UI mode values
May 24, 2026
5f35c08
Merge pull request #103 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 24, 2026
1fa8c45
Add Render deployment config for backend-server
May 24, 2026
725f8ea
Merge pull request #104 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 24, 2026
c293c5c
Add tera-web (Next.js frontend) to Render Blueprint
May 24, 2026
aafcc4f
Merge pull request #105 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 24, 2026
b18a552
Fix duplicate function/param merge artifacts in mistral.ts
May 24, 2026
7d840b2
Merge pull request #106 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 24, 2026
e00f01c
Fix const reassignment error in mistral.ts
May 24, 2026
568d402
Merge pull request #107 from talocode/codex/cloudflare-deploy
Abdulmuiz44 May 24, 2026
55a6bac
Add web health check route for Render
May 24, 2026
8e436b7
Defer Supabase server client creation
Abdulmuiz44 May 25, 2026
9f15915
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
99a674f
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
9dc6b10
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
4dee0e0
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
50da86e
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
5d48796
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
df3c93a
Use request-scoped auth in blockchain lab routes
Abdulmuiz44 May 25, 2026
ac6b8ef
Refine shared button styles for dark mode clarity
Abdulmuiz44 May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .commandcode/taste/taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Taste (Continuously Learned by [CommandCode][cmd])

[cmd]: https://commandcode.ai/

8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ LEMON_SQUEEZY_WEBHOOK_SECRET=your_webhook_secret
LEMON_SQUEEZY_PRO_VARIANT_ID=your_pro_plan_variant_id
LEMON_SQUEEZY_PLUS_VARIANT_ID=your_plus_plan_variant_id

# Resend Email Automations
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=TeraAI <onboarding@resend.dev>
RESEND_REPLY_TO_EMAIL=support@your-domain.com

# Important account emails
# Used for welcome, usage limit, billing status, and team invite emails.

# Application URLs
# Local development
NEXT_PUBLIC_APP_URL=http://localhost:3000
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .forge/executions/18bdd766-de87-4aea-a95e-65b08636d21a.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[2026-04-20T13:45:28.457860900+00:00] Started execution for plan: 2d054b74-476c-4350-9b0d-01fe30d3dea3
[2026-04-20T13:45:28.532783200+00:00] [Provider] Refining step: Analyze workspace context
[2026-04-20T13:45:29.666195600+00:00] Resolved action: InspectFiles against src
4 changes: 4 additions & 0 deletions .forge/executions/1d3f6f74-62a1-4546-9546-440bc9eec176.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[2026-04-20T14:01:25.320370100+00:00] Started execution for plan: d0c3c8e7-00bc-46e9-a4dc-650684f9a2ff
[2026-04-20T14:01:25.392901100+00:00] [Provider] Refining step: Analyze workspace context
[2026-04-20T14:01:51.628467+00:00] [Provider] Refinement failed: Request failed: error sending request for url (https://api.mistral.ai/v1/chat/completions). Using fallback.
[2026-04-20T14:01:51.629282600+00:00] Resolved action: InspectFiles against
3 changes: 3 additions & 0 deletions .forge/executions/23c8bec4-f82e-4857-a6de-67f3b8a60eec.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[2026-04-20T13:44:37.566968200+00:00] Started execution for plan: 2d054b74-476c-4350-9b0d-01fe30d3dea3
[2026-04-20T13:44:37.662824400+00:00] [Provider] Refining step: Analyze workspace context
[2026-04-20T13:44:39.095675800+00:00] Resolved action: InspectFiles against src
3 changes: 3 additions & 0 deletions .forge/executions/c68159c7-9e6e-4271-90b6-73a6414bfba0.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[2026-04-20T14:33:38.557977700+00:00] Started execution for plan: d0c3c8e7-00bc-46e9-a4dc-650684f9a2ff
[2026-04-20T14:33:38.637442100+00:00] [Provider] Refining step: Analyze workspace context
[2026-04-20T14:33:40.691084300+00:00] Resolved action: InspectFiles against src
7 changes: 7 additions & 0 deletions .forge/executions/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"id": "c68159c7-9e6e-4271-90b6-73a6414bfba0",
"planId": "d0c3c8e7-00bc-46e9-a4dc-650684f9a2ff",
"status": "running",
"mode": "step_by_step",
"currentStepId": "step_1"
}
42 changes: 42 additions & 0 deletions .forge/plans/2d054b74-476c-4350-9b0d-01fe30d3dea3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"id": "2d054b74-476c-4350-9b0d-01fe30d3dea3",
"taskId": "7fbdc7ca-d44b-47ca-9db1-30ad5c19b87c",
"status": "approved",
"title": "Plan for: what is this project about?",
"objective": "what is this project about?",
"steps": [
{
"id": "step_1",
"kind": "inspect",
"title": "Analyze workspace context",
"objective": "Assess current state of relevant files.",
"status": "pending",
"filesLikelyInvolved": [],
"requiredTools": [
"fs_list"
]
},
{
"id": "step_2",
"kind": "edit",
"title": "Implement changes",
"objective": "```json\n{\n \"plan\": {\n \"id\": \"plan_1\",\n \"taskId\": \"task_1\",\n \"status\": \"draft\",\n \"title\": \"Analyze Tera Project\",\n \"objective\": \"Understand the purpose and structure of the Tera project",
"status": "pending",
"filesLikelyInvolved": [
"src/main.rs"
],
"requiredTools": [
"fs_write"
]
}
],
"dependencies": [
{
"stepId": "step_2",
"dependsOn": "step_1"
}
],
"assumptions": [],
"risks": [],
"architectureProposal": null
}
42 changes: 42 additions & 0 deletions .forge/plans/d0c3c8e7-00bc-46e9-a4dc-650684f9a2ff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"id": "d0c3c8e7-00bc-46e9-a4dc-650684f9a2ff",
"taskId": "2c368bff-7a21-47c5-8640-dc0f68bd74b1",
"status": "approved",
"title": "Plan for: tell me what this project is about",
"objective": "tell me what this project is about",
"steps": [
{
"id": "step_1",
"kind": "inspect",
"title": "Analyze workspace context",
"objective": "Assess current state of relevant files.",
"status": "pending",
"filesLikelyInvolved": [],
"requiredTools": [
"fs_list"
]
},
{
"id": "step_2",
"kind": "edit",
"title": "Implement changes",
"objective": "```json\n{\n \"plan\": {\n \"id\": \"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d\",\n \"taskId\": \"project_analysis\",\n \"status\": \"draft\",\n \"title\": \"Analyze Tera Project\",\n \"objective\": \"Determine what t",
"status": "pending",
"filesLikelyInvolved": [
"src/main.rs"
],
"requiredTools": [
"fs_write"
]
}
],
"dependencies": [
{
"stepId": "step_2",
"dependsOn": "step_1"
}
],
"assumptions": [],
"risks": [],
"architectureProposal": null
}
42 changes: 42 additions & 0 deletions .forge/plans/e44ed371-65d0-4399-97a1-fd2bbf46de00.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"id": "e44ed371-65d0-4399-97a1-fd2bbf46de00",
"taskId": "5b12269e-62c9-41d1-af4d-a9d06bc811d5",
"status": "ready_for_review",
"title": "Plan for: what is Tera about",
"objective": "what is Tera about",
"steps": [
{
"id": "step_1",
"kind": "inspect",
"title": "Analyze workspace context",
"objective": "Assess current state of relevant files.",
"status": "pending",
"filesLikelyInvolved": [],
"requiredTools": [
"fs_list"
]
},
{
"id": "step_2",
"kind": "edit",
"title": "Implement changes",
"objective": "```json\n{\n \"plan\": {\n \"id\": \"c0f7b5e8-1234-5678-9abc-def123456789\",\n \"taskId\": \"what_is_tera_about\",\n \"status\": \"draft\",\n \"title\": \"Investigate Tera project to understand its purpose\",\n ",
"status": "pending",
"filesLikelyInvolved": [
"src/main.rs"
],
"requiredTools": [
"fs_write"
]
}
],
"dependencies": [
{
"stepId": "step_2",
"dependsOn": "step_1"
}
],
"assumptions": [],
"risks": [],
"architectureProposal": null
}
6 changes: 6 additions & 0 deletions .forge/provider_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"kind": "openai_compatible",
"baseUrl": "https://api.mistral.ai",
"modelId": "mistral-small-latest",
"apiKeySet": true
}
1 change: 1 addition & 0 deletions .forge/provider_secret.key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1Vphvx1drTK9OdsQBv1lsTVr4bsaBrv
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove committed provider secret from repository

This commit adds a plaintext credential file to source control, which exposes the key to anyone with repository/history access and makes accidental reuse likely in other environments. Even if it is intended for local tooling, keeping it in git is a security risk and should be reverted with key rotation.

Useful? React with 👍 / 👎.

104 changes: 104 additions & 0 deletions .github/workflows/deploy-cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Deploy to Cloudflare Workers

on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: cloudflare-production
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max-old-space-size=6144
DISABLE_WEBPACK_CACHE: "1"
AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
AUTH_URL: ${{ secrets.AUTH_URL }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
LEMON_SQUEEZY_API_KEY: ${{ secrets.LEMON_SQUEEZY_API_KEY }}
LEMON_SQUEEZY_PLUS_VARIANT_ID: ${{ secrets.LEMON_SQUEEZY_PLUS_VARIANT_ID }}
LEMON_SQUEEZY_PRO_VARIANT_ID: ${{ secrets.LEMON_SQUEEZY_PRO_VARIANT_ID }}
LEMON_SQUEEZY_WEBHOOK_SECRET: ${{ secrets.LEMON_SQUEEZY_WEBHOOK_SECRET }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
NEXT_PUBLIC_APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_LEMON_STORE_ID: ${{ secrets.NEXT_PUBLIC_LEMON_STORE_ID }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
RESEND_FROM_EMAIL: ${{ secrets.RESEND_FROM_EMAIL }}
RESEND_REPLY_TO_EMAIL: ${{ secrets.RESEND_REPLY_TO_EMAIL }}
SEARXNG_BASE_URL: ${{ secrets.SEARXNG_BASE_URL }}
SERPER_API_KEY: ${{ secrets.SERPER_API_KEY }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SUPABASE_JWT_SECRET: ${{ secrets.SUPABASE_JWT_SECRET }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
WEB_URL: ${{ secrets.WEB_URL }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11.0.9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build OpenNext worker
run: pnpm exec opennextjs-cloudflare build

- name: Write Cloudflare runtime secrets file
shell: bash
run: |
cat > .cloudflare.secrets.env <<EOF
AUTH_SECRET=${AUTH_SECRET}
AUTH_URL=${AUTH_URL}
GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
LEMON_SQUEEZY_API_KEY=${LEMON_SQUEEZY_API_KEY}
LEMON_SQUEEZY_PLUS_VARIANT_ID=${LEMON_SQUEEZY_PLUS_VARIANT_ID}
LEMON_SQUEEZY_PRO_VARIANT_ID=${LEMON_SQUEEZY_PRO_VARIANT_ID}
LEMON_SQUEEZY_WEBHOOK_SECRET=${LEMON_SQUEEZY_WEBHOOK_SECRET}
MISTRAL_API_KEY=${MISTRAL_API_KEY}
NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
NEXT_PUBLIC_LEMON_STORE_ID=${NEXT_PUBLIC_LEMON_STORE_ID}
NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}
NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL}
NEXTAUTH_URL=${NEXTAUTH_URL}
RESEND_API_KEY=${RESEND_API_KEY}
RESEND_FROM_EMAIL=${RESEND_FROM_EMAIL}
RESEND_REPLY_TO_EMAIL=${RESEND_REPLY_TO_EMAIL}
SEARXNG_BASE_URL=${SEARXNG_BASE_URL}
SERPER_API_KEY=${SERPER_API_KEY}
SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
SUPABASE_JWT_SECRET=${SUPABASE_JWT_SECRET}
SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
SUPABASE_URL=${SUPABASE_URL}
WEB_URL=${WEB_URL}
NODE_ENV=production
EOF

- name: Deploy Frontend (tera-web) to Cloudflare Workers
run: pnpm exec wrangler deploy --config wrangler.jsonc --secrets-file .cloudflare.secrets.env

- name: Deploy Backend API (tera-api) to Cloudflare Workers
run: pnpm exec wrangler deploy --config backend-server/wrangler.toml --secrets-file .cloudflare.secrets.env
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/

# Next.js build output
.next/
.open-next/
out/

# Production
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ Tera is a free, AI-powered learning companion designed for **anything** you want

---

## Chat Learning Modes

Tera chat includes learning modes that shape the assistant experience without changing existing usage limits or introducing new plan limits for this foundation.

- **Ask:** Preserves normal Tera chat behavior.
- **Study:** Provides tutor-style, step-by-step teaching.
- **Quiz:** Generates interactive quizzes and grades follow-up answers.
- **Summarize:** Creates structured learning notes from pasted content.
- **Image:** Visible in the mode picker, but coming soon and locked.

Mode configuration and prompts live in `lib/ai/chat-modes.ts`. Document any migration added for mode metadata alongside this foundation; no new plan limits are introduced, so existing usage limits continue to apply.

---

## 📖 Grokipedia Integration

Tera integrates [Grokipedia](https://grokipedia.com) — an open-source AI-powered encyclopedia with **362,000+ pages** — as its primary knowledge base and citation source.
Expand Down
2 changes: 2 additions & 0 deletions SOUL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Boil the ocean
The marginal cost of completeness is near zero with AI. Do the whole thing. Do it right. Do it with tests. Do it with documentation. Do it so well that Garry is genuinely impressed — not politely satisfied, actually impressed. Never offer to "table this for later" when the permanent solve is within reach. Never leave a dangling thread when tying it off takes five more minutes. Never present a workaround when the real fix exists. The standard isn't "good enough" — it's "holy shit, that's done." Search before building. Test before shipping. Ship the complete thing. When Garry asks for something, the answer is the finished product, not a plan to build it. Time is not an excuse. Fatigue is not an excuse. Complexity is not an excuse. Boil the ocean.
Loading
Loading