Skip to content

Commit da0bf40

Browse files
committed
Add simple freebuff website
1 parent dc4f5b3 commit da0bf40

40 files changed

+2606
-1
lines changed

bun.lock

Lines changed: 51 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

freebuff/web/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.next/
2+
node_modules/
3+
next-env.d.ts

freebuff/web/knowledge.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Freebuff Web
2+
3+
The Freebuff website (freebuff.com) — a simplified marketing and auth frontend for the Freebuff free coding agent.
4+
5+
## Architecture
6+
7+
- **Separate Next.js app** in `freebuff/web/`, not a conditionally-configured version of `web/`
8+
- **Shared auth**: Same NextAuth config, same database, same GitHub OAuth — one account works for both Codebuff and Freebuff
9+
- **Shared backend**: The Freebuff CLI talks to the Codebuff backend (`codebuff.com`). This website is primarily a marketing + auth frontend.
10+
- **Minimal scope**: Landing page, login, onboard (CLI auth callback). No pricing, store, org management, admin, or docs.
11+
12+
## Key differences from Codebuff web
13+
14+
- No PostHog analytics
15+
- No contentlayer/docs system
16+
- No Stripe billing UI (but auth-options still creates Stripe customers for shared accounts)
17+
- No org management, admin panel, or store
18+
- Freebuff-specific branding (green accent, "Free" emphasis)
19+
20+
## Running locally
21+
22+
```bash
23+
bun --cwd freebuff/web dev
24+
```
25+
26+
Runs on port 3002 by default (to avoid conflicts with Codebuff web on 3000).
27+
28+
## Environment
29+
30+
Same env vars as the main Codebuff web app. In production, deploy with:
31+
- `NEXT_PUBLIC_CODEBUFF_APP_URL=https://freebuff.com`
32+
- `NEXTAUTH_URL=https://freebuff.com`
33+
- Same DB credentials as Codebuff
34+
- Potentially a separate GitHub OAuth app for the freebuff.com callback URL

freebuff/web/next.config.mjs

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import { resolve } from 'path'
2+
3+
const FREEBUFF_PORT = 3002
4+
5+
/** @type {import('next').NextConfig} */
6+
const nextConfig = {
7+
outputFileTracingRoot: resolve(import.meta.dirname, '../../'),
8+
env: {
9+
// In development, override the app URL to point to the Freebuff dev server port.
10+
// In production, NEXT_PUBLIC_CODEBUFF_APP_URL is set via deployment env vars.
11+
...(process.env.NODE_ENV === 'development'
12+
? { NEXT_PUBLIC_CODEBUFF_APP_URL: `http://localhost:${FREEBUFF_PORT}` }
13+
: {}),
14+
},
15+
eslint: {
16+
ignoreDuringBuilds: true,
17+
},
18+
typescript: {
19+
ignoreBuildErrors: true,
20+
},
21+
webpack: (config) => {
22+
config.resolve.fallback = { fs: false, net: false, tls: false, path: false }
23+
config.externals.push(
24+
{ 'thread-stream': 'commonjs thread-stream', pino: 'commonjs pino' },
25+
'pino-pretty',
26+
'encoding',
27+
'perf_hooks',
28+
'async_hooks',
29+
)
30+
config.externals.push(
31+
'@codebuff/code-map',
32+
'@codebuff/code-map/parse',
33+
'@codebuff/code-map/languages',
34+
/^@codebuff\/code-map/,
35+
)
36+
config.infrastructureLogging = {
37+
level: 'error',
38+
}
39+
return config
40+
},
41+
headers: () => {
42+
return [
43+
{
44+
source: '/(.*)',
45+
headers: [
46+
{
47+
key: 'X-Frame-Options',
48+
value: 'SAMEORIGIN',
49+
},
50+
],
51+
},
52+
{
53+
source: '/api/auth/cli/:path*',
54+
headers: [
55+
{
56+
key: 'Access-Control-Allow-Origin',
57+
value: '*',
58+
},
59+
{
60+
key: 'Access-Control-Allow-Methods',
61+
value: 'GET, POST, OPTIONS',
62+
},
63+
{
64+
key: 'Access-Control-Allow-Headers',
65+
value: 'Content-Type',
66+
},
67+
],
68+
},
69+
]
70+
},
71+
reactStrictMode: false,
72+
}
73+
74+
export default nextConfig

freebuff/web/package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@codebuff/freebuff-web",
3+
"version": "1.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "next dev --port 3002",
8+
"build": "next build",
9+
"start": "next start",
10+
"typecheck": "tsc --noEmit -p .",
11+
"clean": "rm -rf .next"
12+
},
13+
"dependencies": {
14+
"@auth/drizzle-adapter": "^1.7.4",
15+
"@codebuff/billing": "workspace:*",
16+
"@codebuff/common": "workspace:*",
17+
"@codebuff/internal": "workspace:*",
18+
"@radix-ui/react-avatar": "^1.1.10",
19+
"@radix-ui/react-slot": "^1.1.2",
20+
"class-variance-authority": "^0.7.1",
21+
"clsx": "^2.1.1",
22+
"drizzle-orm": "0.45.1",
23+
"framer-motion": "^11.13.3",
24+
"lucide-react": "^0.487.0",
25+
"next": "15.5.11",
26+
"next-auth": "^4.24.11",
27+
"next-themes": "^0.3.0",
28+
"pino": "^9.6.0",
29+
"react": "18.3.1",
30+
"react-dom": "18.3.1",
31+
"tailwind-merge": "^2.5.2",
32+
"zod": "^4.2.1"
33+
},
34+
"devDependencies": {
35+
"@tailwindcss/typography": "^0.5.15",
36+
"@types/node": "^22.14.0",
37+
"@types/react": "18.3.26",
38+
"@types/react-dom": "18.3.7",
39+
"autoprefixer": "^10.4.21",
40+
"postcss": "^8",
41+
"tailwindcss": "^3.4.11",
42+
"tailwindcss-animate": "^1.0.7",
43+
"typescript": "^5"
44+
}
45+
}

freebuff/web/postcss.config.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

0 commit comments

Comments
 (0)