A full-stack workspace booking platform with:
- User authentication (JWT)
- Workspace management (CRUD)
- Reservation system
- Review functionality
Backend | Frontend |
---|---|
Express.js | React 18 |
PostgreSQL | Vite |
Sequelize | Redux |
JWT + bcrypt | React Router v6 |
CORS/CSRF | CSS3 |
- User Authentication: Registration, login, logout with JWT
- Workspace Management: CRUD operations for workspace listings
- Reservation System: Date-based workspace bookings with validation
- Review System: Workspace reviews with ratings and images
- Image Management: Support for workspace and review images
- Security: CSRF protection, password hashing, input validation
Tables:
- Users: Authentication and profile data
- Spots: Workspace listings with location and details
- Bookings: Workspace reservations with date validation
- Reviews: User reviews with ratings (1-5 stars)
- SpotImages: Workspace image management
- ReviewImages: Review image attachments
- Node.js 18+
- PostgreSQL (local or remote)
- Git
-
Clone and Install:
git clone <repository-url> cd DevLabs-Demo/backend npm install
-
Environment Configuration:
cp .env.example .env # Edit .env with your database credentials
-
Database Setup:
# Create database npm run sequelize db:create # Run migrations npm run sequelize db:migrate # Seed demo data npm run sequelize db:seed:all
-
Start Development Server:
npm start # Backend runs on http://localhost:8000 # (or your configured PORT, defaults to 8000 in backend/bin/www)
-
Install Dependencies:
cd frontend npm install
-
Start Development Server:
npm run dev # Frontend runs on http://localhost:5173
DevLabs-Demo/
├── backend/
│ ├── config/
│ │ └── database.js # Database configuration
│ ├── db/
│ │ ├── migrations/ # Database schema migrations
│ │ ├── models/ # Sequelize models
│ │ └── seeders/ # Demo data seeders
│ ├── routes/
│ │ ├── api/ # API route handlers
│ │ │ ├── session.js # Authentication routes
│ │ │ ├── users.js # User management
│ │ │ ├── spots.js # Property routes
│ │ │ ├── bookings.js # Booking routes
│ │ │ └── reviews.js # Review routes
│ │ └── index.js # Route configuration
│ ├── utils/ # Helper functions
│ ├── app.js # Express application setup
│ └── package.json # Backend dependencies
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ ├── pages/ # Page-level components
│ │ ├── store/ # Redux store configuration
│ │ ├── context/ # React context providers
│ │ └── App.js # Main application component
│ ├── dist/ # Production build output
│ ├── vite.config.js # Vite configuration
│ └── package.json # Frontend dependencies
├── .gitignore # Git ignore rules
├── .env.example # Environment template
└── README.md # This file
cd backend
npm test
cd frontend
npm test
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
-
Create an issue in the GitHub repository
-
Contact the DevLabs development team