Compare commits
7 Commits
e72f55fedc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a51856896 | ||
|
|
77a45f1479 | ||
|
|
993bb08dff | ||
|
|
9221c9eacd | ||
|
|
2329118ff6 | ||
|
|
85ee006ad0 | ||
|
|
1187ca6af9 |
80
.gitea/workflows/deploy.yml
Normal file
80
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
name: Deploy CodeBoard
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSE_PROJECT_NAME: codeboard
|
||||||
|
DOCKER_HOST: tcp://192.168.1.133:2375
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Verify Docker access
|
||||||
|
run: |
|
||||||
|
docker version
|
||||||
|
docker compose version
|
||||||
|
|
||||||
|
- name: Write environment file
|
||||||
|
run: |
|
||||||
|
cat > .env <<'ENVEOF'
|
||||||
|
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||||
|
LLM_BASE_URL=${{ secrets.LLM_BASE_URL }}
|
||||||
|
LLM_MODEL=${{ secrets.LLM_MODEL }}
|
||||||
|
AUTH_SECRET=${{ secrets.AUTH_SECRET }}
|
||||||
|
STRIPE_SECRET_KEY=${{ secrets.STRIPE_SECRET_KEY }}
|
||||||
|
STRIPE_WEBHOOK_SECRET=${{ secrets.STRIPE_WEBHOOK_SECRET }}
|
||||||
|
STRIPE_STARTER_PRICE_ID=${{ secrets.STRIPE_STARTER_PRICE_ID }}
|
||||||
|
STRIPE_PRO_PRICE_ID=${{ secrets.STRIPE_PRO_PRICE_ID }}
|
||||||
|
EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }}
|
||||||
|
ENVEOF
|
||||||
|
sed -i 's/^[[:space:]]*//' .env
|
||||||
|
|
||||||
|
- name: Build and deploy
|
||||||
|
run: |
|
||||||
|
echo "Deploying CodeBoard ${{ gitea.ref_name }}..."
|
||||||
|
docker compose build web worker migrate
|
||||||
|
docker compose up -d --no-deps --remove-orphans web worker migrate redis postgres
|
||||||
|
echo "Waiting for migration and startup..."
|
||||||
|
sleep 25
|
||||||
|
|
||||||
|
- name: Health check
|
||||||
|
run: |
|
||||||
|
for i in 1 2 3 4 5; do
|
||||||
|
STATUS=$(docker inspect --format='{{.State.Running}}' codeboard-web-1 2>/dev/null || true)
|
||||||
|
if [ "$STATUS" = "true" ]; then
|
||||||
|
echo "Container running (attempt $i)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Attempt $i/5 — retrying in 10s..."
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
echo "Health check failed after 5 attempts"
|
||||||
|
docker compose logs web --tail 50
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: Create Gitea Release
|
||||||
|
if: startsWith(gitea.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
TAG="${{ gitea.ref_name }}"
|
||||||
|
curl -s -X POST \
|
||||||
|
"https://gitea.vectry.tech/api/v1/repos/Vectry/codeboard/releases" \
|
||||||
|
-H "Authorization: token ${RELEASE_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${TAG}\", \"body\": \"Automated release for ${TAG}\", \"draft\": false, \"prerelease\": false}" \
|
||||||
|
|| echo "Release may already exist — skipping"
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: docker image prune -f
|
||||||
49
README.md
49
README.md
@@ -2,6 +2,55 @@
|
|||||||
|
|
||||||
Codebase → Onboarding Docs Generator. Paste a GitHub repo URL, get interactive developer onboarding documentation in minutes.
|
Codebase → Onboarding Docs Generator. Paste a GitHub repo URL, get interactive developer onboarding documentation in minutes.
|
||||||
|
|
||||||
|
**Live at [codeboard.vectry.tech](https://codeboard.vectry.tech)**
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
1. **Register** at [codeboard.vectry.tech/register](https://codeboard.vectry.tech/register) with your email and password.
|
||||||
|
2. **Log in** to access the dashboard, generation history, and settings.
|
||||||
|
3. **Paste a GitHub URL** and generate interactive onboarding documentation.
|
||||||
|
|
||||||
|
Registration is required for full access. Unauthenticated visitors can view the landing page, but generating documentation, viewing your dashboard, and browsing generation history all require a logged-in account.
|
||||||
|
|
||||||
|
## Plans and Pricing
|
||||||
|
|
||||||
|
CodeBoard offers three billing tiers. One generation equals one documentation build from a repository URL.
|
||||||
|
|
||||||
|
| Plan | Price | Generations | Highlights |
|
||||||
|
|------|-------|-------------|------------|
|
||||||
|
| **Free** | $0 | 15 per day | Public repos, architecture diagrams, interactive docs |
|
||||||
|
| **Starter** | $5 / month | 1,000 per month | Generation history, API key access, priority support |
|
||||||
|
| **Pro** | $20 / month | 100,000 per month | Full history, multiple API keys, dedicated support, custom integrations |
|
||||||
|
|
||||||
|
Manage your subscription in **Settings > Billing** from the dashboard.
|
||||||
|
|
||||||
|
## API Keys (Programmatic Access)
|
||||||
|
|
||||||
|
Paid plans (Starter and Pro) include API key access for programmatic diagram and documentation generation.
|
||||||
|
|
||||||
|
1. Navigate to **Settings > API Keys** in the dashboard.
|
||||||
|
2. Create a new key and copy it immediately -- it is shown only once.
|
||||||
|
3. Include the key in your requests:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST https://codeboard.vectry.tech/api/generate \
|
||||||
|
-H "Authorization: Bearer YOUR_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"repoUrl": "https://github.com/owner/repo"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Each successful API call counts as one generation against your plan's quota.
|
||||||
|
|
||||||
|
## Generation History
|
||||||
|
|
||||||
|
All generated documentation is saved to your account. From the dashboard you can:
|
||||||
|
|
||||||
|
- Browse past generations per repository.
|
||||||
|
- Compare documentation versions side-by-side to track codebase changes over time.
|
||||||
|
- Re-open any previous generation by its unique link.
|
||||||
|
|
||||||
|
History is per-user -- each account maintains its own generation records.
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
|
import { withSentryConfig } from "@sentry/nextjs";
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const config = {
|
const config = {
|
||||||
transpilePackages: ["@codeboard/shared", "@codeboard/database"],
|
transpilePackages: ["@codeboard/shared", "@codeboard/database"],
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default withSentryConfig(config, {
|
||||||
|
silent: !process.env.CI,
|
||||||
|
disableServerWebpackPlugin: true,
|
||||||
|
disableClientWebpackPlugin: true,
|
||||||
|
});
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
"react-markdown": "^9.0.0",
|
"react-markdown": "^9.0.0",
|
||||||
"stripe": "^20.3.1",
|
"stripe": "^20.3.1",
|
||||||
"tailwind-merge": "^2.6.0",
|
"tailwind-merge": "^2.6.0",
|
||||||
|
"@sentry/nextjs": "^8.28.0",
|
||||||
"zod": "^3.24.0"
|
"zod": "^3.24.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
7
apps/web/sentry.client.config.ts
Normal file
7
apps/web/sentry.client.config.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||||
|
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
|
||||||
|
debug: false,
|
||||||
|
});
|
||||||
7
apps/web/sentry.edge.config.ts
Normal file
7
apps/web/sentry.edge.config.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||||
|
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
|
||||||
|
debug: false,
|
||||||
|
});
|
||||||
7
apps/web/sentry.server.config.ts
Normal file
7
apps/web/sentry.server.config.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||||
|
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
|
||||||
|
debug: false,
|
||||||
|
});
|
||||||
13
apps/web/src/instrumentation.ts
Normal file
13
apps/web/src/instrumentation.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
export async function register() {
|
||||||
|
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||||
|
await import("../sentry.server.config");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.env.NEXT_RUNTIME === "edge") {
|
||||||
|
await import("../sentry.edge.config");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const onRequestError = Sentry.captureRequestError;
|
||||||
@@ -21,6 +21,8 @@ services:
|
|||||||
- EMAIL_USER=hunter@repi.fun
|
- EMAIL_USER=hunter@repi.fun
|
||||||
- EMAIL_PASSWORD=${EMAIL_PASSWORD:-}
|
- EMAIL_PASSWORD=${EMAIL_PASSWORD:-}
|
||||||
- NEXT_PUBLIC_APP_URL=https://codeboard.vectry.tech
|
- NEXT_PUBLIC_APP_URL=https://codeboard.vectry.tech
|
||||||
|
- NEXT_PUBLIC_SENTRY_DSN=https://637c487708794aaf8f2399496cd2e6c6@glitchtip.vectry.tech/2
|
||||||
|
- SENTRY_DSN=https://637c487708794aaf8f2399496cd2e6c6@glitchtip.vectry.tech/2
|
||||||
depends_on:
|
depends_on:
|
||||||
redis:
|
redis:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
|
|||||||
Reference in New Issue
Block a user