Skip to content

2110503-2564/se-project-backend-1_the-backup-team

Repository files navigation

SpaceFlow API

Overview

SpaceFlow is a RESTful API for managing co-working space reservations. The system allows users to browse co-working spaces, view available rooms, make and manage reservations within opening hours.

Tech Stack

  • Node.js with Express.js framework
  • MongoDB with Mongoose ODM
  • JWT for authentication
  • Node-cron for scheduled tasks
  • Jest for testing

Getting Started

Prerequisites

  • Node.js (v22+)
  • MongoDB instance

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/spaceflow.git
cd spaceflow
  1. Install dependencies:
npm install
  1. Set up environment variables:
    • Create config.env for development
    • Create config.test.env for testing

Example of config.env:

PORT = 8000
NODE_ENV = development
MONGO_URI = mongodb://your-mongodb-uri/spaceflow
JWT_SECRET = your-jwt-secret
JWT_EXPIRE = 30d
JWT_COOKIE_EXPIRE = 30
CSRF_SECRET = your-csrf-secret
MAXIMUM_RESERVATIONS = 3

Running the Application

For development:

npm run dev

For production:

npm start

About

se-project-backend-1_the-backup-team created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published