main
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
CShare
CShare is a production-shaped file sharing app with a Vite/React frontend and a TypeScript/Express backend. It supports file upload, expiring share links, recipient previews for small safe files, downloads, dashboard stats, and an admin API.
Project Layout
cshare-app/- React frontend, Vite build, precompressed static assets.backend/- Express API, local disk storage adapter, JSON metadata store, auth primitives, admin API.PRODUCTION.md- deployment notes, required env, Nginx guidance.deploy/- sample service and reverse-proxy config.
Local Development
Backend:
cd backend
npm install
npm run dev
Frontend:
cd cshare-app
npm install
VITE_API_BASE_URL=http://localhost:4001 npm run dev
Final Checks
cd backend && npm run check
cd ../cshare-app && npm run check
Frontend builds create gzip and Brotli assets in cshare-app/dist/. Backend production startup requires strong JWT_ACCESS_SECRET, JWT_REFRESH_SECRET, and ADMIN_API_KEY values.
Publish Notes
Before publishing, configure the environment in PRODUCTION.md, serve cshare-app/dist/ with a static host or Nginx, and proxy /api plus /health to the backend. The included local JSON/disk persistence is suitable for a single-server launch; move to PostgreSQL/R2 before depending on durable multi-server storage.
Languages
JavaScript
71.4%
TypeScript
20.6%
CSS
7.7%
HTML
0.3%