Skip to content

shoaib-1729/jb_website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JB Crownstone

A premium full-stack MERN web application combining a luxury real estate website (public) and a private trading dashboard (login-protected).


🚀 Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB (local instance running on mongodb://localhost:27017)

1. Install & Seed

# Install server dependencies
cd server
npm install

# Seed the database with mock data
npm run seed

# Install client dependencies
cd ../client
npm install

2. Run Development Servers

Terminal 1 – Backend:

cd server
npm run dev
# → Runs on http://localhost:5000

Terminal 2 – Frontend:

cd client
npm run dev
# → Runs on http://localhost:5173

🔑 Login Credentials

Field Value
Email admin@jbcrownstone.com
Password admin123

📁 Project Structure

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

🌐 Routes

Path Access Description
/ Public Luxury landing page
/login Public JWT login form
/dashboard Protected Private trading dashboard

🔒 Security

  • 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

🎨 Design System

Token Value
Background #0B0B0B
Card #121212
Gold accent #D4AF37
Profit #10B981
Loss #EF4444
Font Inter + Playfair Display

About

A demo showcasing the assigned task involving a Property and Trading Website.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages