Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
1.4 KiB
CShare Backend
This is the local production-path API scaffold from CONTINUE.md. It uses Express 5 and TypeScript with local JSON metadata plus disk storage so upload, share, preview, download, dashboard, and auth flows work without external infrastructure.
Commands
npm install
npm run dev
npm run check
npm test
npm run build
The API listens on http://localhost:4001 by default. Frontend requests use VITE_API_BASE_URL; in production, the frontend falls back to same-origin API calls when the variable is omitted.
Implemented Locally
GET /healthPOST /api/auth/register,POST /api/auth/login,POST /api/auth/refresh,POST /api/auth/logout,GET /api/auth/mePOST /api/v1/files/uploadGET /api/v1/files,GET /api/v1/files/:id,DELETE /api/v1/files/:idGET /api/v1/links/:linkId,GET /api/v1/links/:linkId/downloadGET /api/v1/links/:linkId/previewGET /api/v1/dashboard/statsGET /api/admin/overview,/api/admin/files,/api/admin/users,/api/admin/eventsprotected byx-admin-key
Production Adapters Still Needed
The remaining roadmap items require provisioned services and credentials: PostgreSQL/Drizzle migrations, Redis/BullMQ, Cloudflare R2, Resend, Stripe, Sentry, PM2, Nginx, TLS, firewall rules, backups, and DNS. The local API keeps storage and persistence isolated so those adapters can replace the JSON/disk implementation without changing frontend routes.