Skip to content

Latest commit

 

History

1,914 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docs by Gitwork

Frontend-first SaaS MVP for structured proposal building.

Stack

  • Next.js 16 (App Router)
  • React 19 + TypeScript
  • Tailwind CSS
  • Headless UI
  • TanStack Query
  • Prisma ORM + PostgreSQL
  • Next.js API routes (Node.js backend)

MVP Features Delivered

  • Proposal management: create, edit, duplicate, archive, delete
  • Proposal list with search, sort, status, last updated
  • Structured proposal editor for all required MVP sections
  • Drag-and-drop timeline phase ordering
  • Cost breakdown table with currency (GBP/USD/EUR), discount, tax/VAT, and totals
  • CTA + links editor (primary + secondary destinations)
  • Asset/graphics model with placement metadata
  • Split editor + live preview layout on desktop
  • Print-friendly view and export/share endpoint foundation
  • Template-driven architecture with default Gitwork template
  • Settings foundation for reusable snippets and company profile defaults
  • Workspace-scoped People & Rates roster API for Axis and other clients

Routes

  • Landing: /
  • App dashboard: /app
  • Proposals list: /app/proposals
  • Proposal editor: /app/proposals/[id]
  • Proposal preview: /app/proposals/[id]/preview
  • Print/export-ready view: /app/proposals/[id]/print
  • Public shared preview: /preview/[id]
  • Settings: /app/settings
  • Templates foundation: /app/templates

API Routes

  • GET /api/health (public health check)
  • GET /api/proposals
  • POST /api/proposals
  • GET /api/proposals/[id]
  • PATCH /api/proposals/[id]
  • POST /api/proposals/[id]/duplicate
  • POST /api/proposals/[id]/archive
  • DELETE /api/proposals/[id]/delete
  • GET /api/templates
  • POST /api/proposals/[id]/costing
  • POST /api/proposals/[id]/timeline
  • POST /api/proposals/[id]/engagement (CTA + links)
  • POST /api/proposals/[id]/export (print/PDF/share-link foundation)
  • GET /api/rate-card/people (supports search and includeArchived=true)
  • POST /api/rate-card/people
  • GET /api/rate-card/people/[id]
  • PATCH /api/rate-card/people/[id]
  • DELETE /api/rate-card/people/[id] (soft archive)

API Authentication

  • GET /api/health is public.
  • All other /api/* routes require either Authorization: Bearer <API_KEY> or the internal gitwork_api_session HttpOnly cookie used by the app shell.
  • Configure API_KEY in the environment. NEXT_PUBLIC_API_KEY is still read as a compatibility fallback, but should be treated as legacy.

Rate Card Contract

  • Docs by Gitwork is the source of truth for shared People & Rates.
  • Each RateCardPerson stores name, area, sourceRate, sourceCurrencyCode, and billingPeriod (DAY, WEEK, MONTH).
  • Axis mirrors that roster locally, then converts it to a GBP day rate on-device for proposal pricing.
  • The default Gitwork roster is seeded automatically into the default workspace.

Data Model (Prisma)

prisma/schema.prisma includes:

  • User
  • Workspace
  • WorkspaceMember
  • Document
  • DocumentTemplate
  • DocumentSection
  • CostLineItem
  • TimelinePhase
  • Asset
  • Link
  • CTA
  • Export
  • RateCardPerson

Setup

  1. Install dependencies:
npm install
  1. Configure environment:
cp .env.example .env
  1. Ensure DATABASE_URL points to a running PostgreSQL instance.
  2. Generate Prisma client:
npm run db:generate
  1. Push schema:
npm run db:push
  1. Seed default Gitwork template + sample proposal:
npm run db:seed
  1. Start the app:
npm run dev

Scripts

  • npm run dev
  • npm run build
  • npm run lint
  • npm run db:generate
  • npm run db:push
  • npm run db:migrate
  • npm run db:seed

Notes

  • PDF export is implemented as a foundation via print-optimized output and export records.
  • Asset handling is URL-based for MVP.
  • Architecture is document-type ready (Proposals now, SLAs and additional docs next).

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages