commit 5920325d655341eb95edf0aef9724e1c9ce01875 Author: Octoturge Date: Sun Sep 6 11:01:04 2026 +0200 Nuxt coursework boilerplate: Tailwind, Drizzle (MySQL), Redis, Pug page, Vercel deploy workflow diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f2de996 --- /dev/null +++ b/.env.example @@ -0,0 +1,18 @@ +# Already set in your Coder workspace automatically - copy to .env only for +# running outside Coder (e.g. testing locally against your own MySQL/Redis). +MYSQL_HOST=school-mysql +MYSQL_PORT=3306 +MYSQL_DATABASE= +MYSQL_USER= +MYSQL_PASSWORD= + +REDIS_HOST=school-redis +REDIS_PORT=6379 +REDIS_USERNAME= +REDIS_PASSWORD= + +# Only needed if you want the deploy workflow to push this project to Vercel. +# Leave unset in Gitea Actions repo secrets and the deploy step is skipped. +VERCEL_TOKEN= +VERCEL_ORG_ID= +VERCEL_PROJECT_ID= diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..bc5e6d1 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy + +on: + push: + branches: [main] + +jobs: + deploy-vercel: + # Only runs once VERCEL_TOKEN is set as a repo secret - otherwise skipped. + if: ${{ secrets.VERCEL_TOKEN != '' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install + + - name: Deploy to Vercel + run: bunx vercel deploy --prod --yes --token "$VERCEL_TOKEN" + env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a7f73a --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc +.DS_Store +.fleet +.idea + +# Local env files +.env +.env.* +!.env.example diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca318b2 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Nuxt Boilerplate + +Starter for the Nuxt coursework workspace: Bun + Nuxt + TypeScript + Tailwind, +with MySQL (Drizzle ORM) and Redis wired up to the shared course databases. + +## Development +```bash +bun install +bun run db:push # creates the `notes` table from server/db/schema.ts +bun run dev +``` + +Open http://localhost:3000 - the home page shows a small notes list (MySQL) +and a key/value box (Redis) so you can see both connections working. + +## What's here +- `app/pages/index.vue` - example page using `