@@ -232,63 +232,6 @@ The frontend proxies API requests to `/api` in development. In production, both
2322328 . ** Payment** : Client pays via Stripe Checkout
2332339 . ** Confirmation** : Both parties receive email confirmations
234234
235- ## API Endpoints
236-
237- ### Auth
238- - ` POST /api/auth/signup ` - Create account
239- - ` POST /api/auth/signin ` - Request magic link
240- - ` POST /api/auth/verify ` - Verify magic link token
241- - ` GET /api/auth/me ` - Get current user
242-
243- ### Clients
244- - ` GET /api/clients ` - List clients
245- - ` GET /api/clients/:id ` - Get client
246- - ` POST /api/clients ` - Create client
247- - ` PATCH /api/clients/:id ` - Update client
248- - ` DELETE /api/clients/:id ` - Archive client
249- - ` POST /api/clients/:id/restore ` - Restore client
250-
251- ### Invoices
252- - ` GET /api/invoices ` - List invoices (with filters)
253- - ` GET /api/invoices/:id ` - Get invoice with details
254- - ` POST /api/invoices ` - Create invoice
255- - ` PATCH /api/invoices/:id ` - Update invoice
256- - ` POST /api/invoices/:id/send ` - Send to client
257- - ` POST /api/invoices/:id/duplicate ` - Duplicate invoice
258- - ` POST /api/invoices/:id/pdf ` - Generate PDF
259- - ` GET /api/invoices/:id/pdf ` - Download PDF
260-
261- ### Public (No Auth)
262- - ` GET /api/public/invoice/:token ` - View public invoice
263- - ` POST /api/public/invoice/:token/pay ` - Initiate payment
264-
265- ### Dashboard
266- - ` GET /api/dashboard ` - Get KPIs and recent invoices
267- - ` GET /api/dashboard/stats ` - Get statistics
268-
269- ### Settings
270- - ` GET /api/settings ` - Get user settings
271- - ` PATCH /api/settings ` - Update settings
272- - ` POST /api/settings/logo ` - Upload logo
273- - ` DELETE /api/settings/logo ` - Remove logo
274-
275- ### Webhooks
276- - ` POST /api/webhooks/stripe ` - Stripe webhook handler
277-
278- ## Database Schema
279-
280- See ` apps/api/migrations/001_initial.sql ` for the complete schema including:
281-
282- - ` users ` - User accounts
283- - ` magic_link_tokens ` - Authentication tokens
284- - ` clients ` - Client records
285- - ` invoices ` - Invoice headers
286- - ` invoice_items ` - Line items
287- - ` invoice_events ` - Status history
288- - ` invoice_public_tokens ` - Secure public links
289- - ` payments ` - Payment records
290- - ` settings ` - User preferences
291-
292235## Testing
293236
294237``` bash
0 commit comments