Skip to content

Repository files navigation

Pink STEM

CI

A notes app on Next.js (App Router) + MongoDB, structured to match the Bits of Good project conventions used in GTBitsOfGood/ican.

Tech Stack

  • TypeScript
  • Next.js (App Router)
  • MongoDB / Mongoose
  • TailwindCSS
  • React Query
  • Zod

Onboarding

MongoDB

Install MongoDB Community Server to host a local instance, or use the bundled Docker setup. MongoDB Compass is helpful for inspecting the database.

Dependencies

Node version is pinned in .nvmrc. With nvm:

nvm use
npm install

Environment

cp .env.local.example .env.local   # then edit MONGODB_URI

Development

Run both at the same time:

npm run dev
docker compose up

Open http://localhost:3000

Code Formatting

Install and enable Prettier in VSCode. A pre-commit hook formats and lints staged files automatically.

Scripts

Command Does
npm run dev Start the dev server
npm run build Production build
npm run lint ESLint
npm run typecheck tsc --noEmit
npm run format Prettier write
npm run format:check Prettier check (runs in CI)

API

Base path is /api/v1.

Method Endpoint Does
GET /notes List notes, newest first
POST /notes Create { title, body }
GET /notes/:id Read one
PATCH /notes/:id Update { title?, body? }
DELETE /notes/:id Delete, returns 204

Structure

See docs/ARCHITECTURE.md for the layering and the checklist for adding a new resource.

src/
  app/
    api/v1/notes/route.ts
    api/v1/notes/[id]/route.ts
    layout.tsx
    page.tsx
  components/
    QueryProvider.tsx
    hooks/useNotes.ts
    notes/
    ui/
  constants/
  db/
    actions/note.ts
    models/note.ts
    dbConnect.ts
  http/
    fetchHTTPClient.ts
    noteHTTPClient.ts
  lib/
  middleware/
  services/note.ts
  styles/globals.css
  types/
    exceptions.ts
    models.ts
    note.ts
  utils/
    errorHandler.ts
    errorMessages.ts
    note.ts
    validation.ts
    withErrorHandler.ts

Environments

Branches, deploy previews, and branch protection are documented in docs/ENVIRONMENTS.md.

  • production → production site
  • main → staging site (default branch, base for feature PRs)
  • every branch and PR → Netlify deploy preview

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages