Skip to content

Rifat12/FrequentFlyers-backend

Repository files navigation

Frequent Flyers

Features

  • User Authentication (Register/Login)
  • Trip Management
  • Flight Search (using Amadeus API)
  • Event Planning
  • Session-based Authentication
  • PostgreSQL Database

Prerequisites

  • Node.js (v20 or higher)
  • .env file
  • Amadeus API credentials
  • npm or yarn

Environment Variables

Create a .env file in the root directory.

Installation & Database Setup

  1. Clone the repository:
git clone <repository-url>
cd travel
  1. Install dependencies:
npm install
  1. Set up environment variables:
  • Copy .env.example to .env
  • Fill in your database and Amadeus API credentials
  1. Start the server:
npm start

The server will start on http://localhost:4000

Database Management

Normal Operation

For normal application operation, just start the server:

npm start

The application will:

  • Connect to the existing database
  • Use existing tables
  • Not modify the schema

Development

Running in Development Mode

npm run dev

API Documentation

Detailed API documentation is available in docs/api-guide.md

Frontend Integration

Frontend developers should:

  1. Use the provided API documentation in docs/api-guide.md
  2. Enable credentials in API requests:
fetch(url, {
  credentials: 'include',
  // ... other options
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published