Refactor the authentication system to separate login and registration forms, implement password hashing, manage JWT tokens, and enable user data persistence in `backend/data/users.json`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 375ec6d3-d5af-4f82-ab81-5c60fd4a86a3 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 8d427c3d-aa60-488b-82c4-6cef148ba5d7 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/147e665c-8c0d-48ec-b0ad-fdc89cd4460f/375ec6d3-d5af-4f82-ab81-5c60fd4a86a3/e238nM8 Replit-Helium-Checkpoint-Created: true
17 lines
1.1 KiB
Markdown
17 lines
1.1 KiB
Markdown
# Project Overview
|
|
|
|
## Architecture
|
|
- Static Webflow-exported frontend in the project root (`index.html`, `company.html`, `order.html`, `login.html`, `css/`, `js/`, `images/`).
|
|
- Node.js/Express backend in `backend/` serves the root static site and `/api/*` endpoints.
|
|
- Backend data is stored in JSON files under `backend/data/`; no external database is required for the current setup.
|
|
|
|
## Replit Setup
|
|
- Main workflow runs `cd backend && npm start` on port 5000.
|
|
- Express listens on `0.0.0.0` and trusts the Replit proxy for preview compatibility.
|
|
- Production deployment is configured to run the same backend server command.
|
|
|
|
## Important Notes
|
|
- Run backend commands from the `backend/` directory so static files resolve correctly.
|
|
- The frontend API helper uses relative same-origin `/api` URLs when served over HTTP.
|
|
- User preference: never change the site's colors unless explicitly requested; only change objects/content/layout.
|
|
- Login/register uses `/api/auth/*`, bcrypt-hashed passwords, JWT tokens in browser local storage, and file-based users in `backend/data/users.json`. |