Skip to content

Commit 075d2d3

Browse files
committed
docs (wip)
1 parent 2546399 commit 075d2d3

98 files changed

Lines changed: 6208 additions & 1170 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ DISCORD_GUILD_ID="1231994798165069987"
1919
DISCORD_PUBLIC_KEY=""
2020
DISCORD_TOKEN=""
2121

22+
# Docs: GitHub API cache TTL in seconds (default: 0 locally, 300 on Vercel)
23+
# DOCS_CACHE_TTL=300
24+
2225
# GitHub
2326
GITHUB_CLIENT_ID=""
2427
GITHUB_CLIENT_SECRET=""
@@ -31,5 +34,5 @@ GOOGLE_CLIENT_SECRET="aaaaaa-aa-aaaaaaaaaaaaaaaaaaaaaaaaa"
3134

3235
# Expose Specific Auto-generated Supabase Credentials to the Client (don't change these!)
3336
NEXT_PUBLIC_SUPABASE_URL=$API_URL
34-
NEXT_PUBLIC_SUPABASE_ANON_KEY=$ANON_KEY
37+
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=$PUBLISHABLE_KEY
3538
NEXT_PUBLIC_AVATARS_BUCKET="avatars"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,6 @@ volumes/s3/*
5151

5252
# supabase
5353
supabase/*
54-
!supabase/config.toml
54+
!supabase/config.toml
55+
src/supabase/types.d.ts
56+
src/supabase/drizzle

docs/contributing.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Contributing
3+
description: Guidelines for contributing to the DevDogs Website.
4+
---
5+
6+
# Contributing
7+
8+
Thanks for helping improve the DevDogs Website!
9+
10+
## Workflow
11+
12+
1. **Fork** the repository and create a feature branch from `main`.
13+
2. **Make your changes** — keep commits focused and descriptive.
14+
3. **Open a pull request** targeting `main`. Fill out the PR template.
15+
16+
## Code style
17+
18+
- TypeScript everywhere — avoid `any`.
19+
- Run `pnpm check` before pushing (lints, typechecks, and formats).
20+
- Prefer editing existing files over creating new ones.
21+
22+
## Database changes
23+
24+
Schema lives in `src/server/db/schema/`. After editing, run:
25+
26+
```bash
27+
pnpm db:push
28+
```
29+
30+
This pulls the introspected schema, pushes migrations, and regenerates Supabase types.
31+
32+
## Documentation
33+
34+
Add or update markdown files in `docs/` alongside your code changes. Use the local preview to check rendering:
35+
36+
```bash
37+
pnpm docs:preview
38+
```

docs/getting-started.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Getting Started
3+
description: Set up the DevDogs Website locally for development.
4+
---
5+
6+
# Getting Started
7+
8+
## Prerequisites
9+
10+
- [Node.js](https://nodejs.org) 18 or later
11+
- [pnpm](https://pnpm.io) 9 or later
12+
- [Docker](https://www.docker.com) (for the local Supabase instance)
13+
14+
## Installation
15+
16+
1. **Clone the repo**
17+
18+
```bash
19+
git clone https://github.com/DevDogs-UGA/DevDogs-Website.git
20+
cd DevDogs-Website
21+
```
22+
23+
2. **Install dependencies**
24+
25+
```bash
26+
pnpm install
27+
```
28+
29+
3. **Start the local Supabase instance and dev server**
30+
31+
```bash
32+
pnpm dev
33+
```
34+
35+
This starts Supabase locally, runs database migrations, and launches the Next.js dev server at `http://localhost:3000`.
36+
37+
## Local docs preview
38+
39+
To preview documentation changes before pushing:
40+
41+
```bash
42+
pnpm docs:preview
43+
```
44+
45+
Then visit `/docs/local` on the running site. The page auto-refreshes when you edit any file in `docs/`.

docs/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: DevDogs Website
3+
description: The official DevDogs UGA club website.
4+
---
5+
6+
# DevDogs Website
7+
8+
Welcome to the documentation for the DevDogs Website — the open-source web platform for the DevDogs club at the University of Georgia.
9+
10+
## What's in here
11+
12+
- **Getting started** — how to set up the project locally
13+
- **Contributing** — guidelines for submitting pull requests
14+
15+
## Tech stack
16+
17+
| Layer | Technology |
18+
|-------|-----------|
19+
| Framework | Next.js 15 (App Router) |
20+
| Database | Supabase (Postgres) |
21+
| ORM | Drizzle ORM |
22+
| Styling | Tailwind CSS v4 |
23+
| Auth | Supabase Auth |

drizzle-introspection.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { type Config } from "drizzle-kit";
2+
import { loadEnvConfig } from "@next/env";
3+
4+
loadEnvConfig(process.cwd());
5+
6+
export default {
7+
out: "./src/supabase/drizzle",
8+
dialect: "postgresql",
9+
casing: "camelCase",
10+
schemaFilter: ["*", "!public", "!_*"],
11+
dbCredentials: {
12+
url: process.env.DB_URL!,
13+
},
14+
introspect: {
15+
casing: "camel",
16+
}
17+
} satisfies Config;
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@ import { loadEnvConfig } from "@next/env";
44
loadEnvConfig(process.cwd());
55

66
export default {
7-
schema: "./src/server/db/schema/tables.ts",
7+
schema: "./src/server/db/schema/index.ts",
88
dialect: "postgresql",
9-
out: "./drizzle",
109
casing: "camelCase",
1110
schemaFilter: ["public"],
1211
dbCredentials: {
1312
url: process.env.DB_URL!,
1413
},
15-
entities: {
16-
roles: {
17-
provider: "supabase",
18-
exclude: ["supabase_auth_admin"],
19-
},
20-
},
2114
} satisfies Config;

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const config = {
3131
remotePatterns: [
3232
new URL("/storage/v1/object/public/**", env.NEXT_PUBLIC_SUPABASE_URL),
3333
],
34-
// dangerouslyAllowLocalIP: env.NODE_ENV !== "production"
34+
dangerouslyAllowLocalIP: env.NODE_ENV !== "production"
3535
},
3636
} satisfies NextConfig;
3737

package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
"scripts": {
77
"build": "next build",
88
"check": "pnpm run lint:fix && pnpm run typecheck && pnpm run prettier",
9-
"db:generate": "drizzle-kit generate",
10-
"db:migrate": "drizzle-kit migrate",
11-
"db:push": "drizzle-kit push",
9+
"db:push": "drizzle-kit pull --config drizzle-introspection.config.ts && drizzle-kit push --config drizzle-migrations.config.ts && supabase gen types --local > src/supabase/types.d.ts",
1210
"sb:seed": "dotenv -v next_public_avatars_bucket=$NEXT_PUBLIC_AVATARS_BUCKET -- supabase seed buckets --yes",
1311
"sb:start": "dotenv -- supabase start && supabase status -o env > .env.local && dotenv -- pnpm sb:seed",
1412
"sb:stop": "supabase stop",
1513
"sb:restart": "pnpm sb:stop && pnpm sb:start",
1614
"dev": "pnpm sb:start && pnpm db:push && pnpm next dev",
15+
"docs:preview": "docs-preview",
1716
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
1817
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
1918
"lint": "eslint src",
@@ -46,19 +45,27 @@
4645
"date-fns": "^4.1.0",
4746
"discord-api-types": "^0.38.44",
4847
"discord-interactions": "^4.4.0",
49-
"drizzle-orm": "1.0.0-beta.20",
48+
"drizzle-orm": "1.0.0-beta.21",
49+
"fumadocs-core": "^16.7.11",
50+
"fumadocs-ui": "^16.7.11",
51+
"gray-matter": "^4.0.3",
5052
"next": "^16.2.2",
53+
"next-mdx-remote": "^6.0.0",
5154
"open-graph-scraper": "^6.11.0",
5255
"postgres": "^3.4.8",
5356
"react": "^19.2.4",
5457
"react-dom": "^19.2.4",
5558
"react-fast-marquee": "^1.6.5",
5659
"react-icons": "^5.6.0",
5760
"react-image-crop": "^11.0.10",
61+
"react-markdown": "^10.1.0",
62+
"remark-frontmatter": "^5.0.0",
63+
"remark-gfm": "^4.0.1",
5864
"zod": "4.1.8",
5965
"zod-form-data": "^3.0.1"
6066
},
6167
"devDependencies": {
68+
"@devdogsuga/docs-preview": "workspace:*",
6269
"@eslint/eslintrc": "^3.3.5",
6370
"@next/env": "^16.2.2",
6471
"@supabase/auth-js": "^2.101.1",
@@ -68,7 +75,7 @@
6875
"@types/react": "^19.2.14",
6976
"@types/react-dom": "^19.2.3",
7077
"dotenv-cli": "^10.0.0",
71-
"drizzle-kit": "1.0.0-beta.20",
78+
"drizzle-kit": "1.0.0-beta.21",
7279
"eslint": "^9.39.4",
7380
"eslint-config-next": "^15.5.14",
7481
"eslint-plugin-drizzle": "^0.2.3",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
export {};

0 commit comments

Comments
 (0)