A premium full-stack MERN web application combining a luxury real estate website (public) and a private trading dashboard (login-protected).
- Node.js 18+
- MongoDB (local instance running on
mongodb://localhost:27017)
# Install server dependencies
cd server
npm install
# Seed the database with mock data
npm run seed
# Install client dependencies
cd ../client
npm installTerminal 1 – Backend:
cd server
npm run dev
# → Runs on http://localhost:5000Terminal 2 – Frontend:
cd client
npm run dev
# → Runs on http://localhost:5173| Field | Value |
|---|---|
| admin@jbcrownstone.com | |
| Password | admin123 |
crown-project/
├── server/
│ ├── models/ # Mongoose schemas (User, Account, Strategy, Asset)
│ ├── routes/ # Express routes (/auth, /accounts, /strategies, /assets)
│ ├── controllers/ # Business logic
│ ├── middleware/ # JWT auth middleware
│ ├── seed.js # Database seeder
│ └── index.js # Express app entry
│
└── client/
└── src/
├── components/ # Navbar, Footer, PropertyCard, StatCard, EquityChart, etc.
├── pages/ # Landing, Login, Dashboard
└── hooks/ # useAuth
| Path | Access | Description |
|---|---|---|
/ |
Public | Luxury landing page |
/login |
Public | JWT login form |
/dashboard |
Protected | Private trading dashboard |
- Passwords hashed with bcryptjs (12 rounds)
- JWT tokens stored in localStorage (7 day expiry)
- All dashboard API routes require
Authorization: Bearer <token> - CORS restricted to
http://localhost:5173 - Sensitive data excluded from API responses
| Token | Value |
|---|---|
| Background | #0B0B0B |
| Card | #121212 |
| Gold accent | #D4AF37 |
| Profit | #10B981 |
| Loss | #EF4444 |
| Font | Inter + Playfair Display |