Flyteback is a drone mission management system that enables users to register, log in, manage drones, create missions, and simulate drone flights. The system also generates PDF flight logs for completed missions, allowing users to track and review flight data easily.
- User Authentication: Register and log in securely.
- Drone Management: Perform CRUD operations on drones.
- Mission Management: Create, read, update, and delete missions.
- Mission Simulation: Start and stop drone missions to simulate flights.
- PDF Generation: Generate and download PDF flight logs for completed missions.
To run this application, you'll need:
- Node.js (version 12 or higher)
- MongoDB (local or cloud instance)
Follow these steps to set up the project locally:
- Clone the repository:
git clone https://github.com/Rohitrky2021/flyteback_pdf.git
cd flyteback_pdf
npm install
echo "MONGO_URI=your_mongodb_uri" >> .env echo "JWT_SECRET=your_jwt_secret" >> .env echo "PORT=your_preferred_port" >> .env
npm start
The project is organized as follows:
.
├── app.js # Main application setup
├── server.js # Server initialization
├── routes
│ └── index.js # API routes
├── controllers
│ ├── droneController.js # Drone CRUD operations
│ ├── missionController.js # Mission CRUD operations
│ ├── simulationController.js # Simulation and PDF generation
│ └── userController.js # User registration and login
├── middlewares
│ └── auth.js # Authentication middleware
├── models
│ ├── Drone.js # Drone model
│ ├── FlightLog.js # Flight log model
│ ├── Mission.js # Mission model
│ └── User.js # User model
└── pdfs # Directory for generated PDF files
- POST /api/register - Register a new user
- POST /api/login - Login a user
- POST /api/drones - Create a new drone
- GET /api/drones - Get all drones
- PUT /api/drones/:id - Update a drone
- DELETE /api/drones/:id - Delete a drone
- POST /api/missions - Create a new mission
- GET /api/missions - Get all missions
- PUT /api/missions/:id - Update a mission
- DELETE /api/missions/:id - Delete a mission
- POST /api/start-mission - Start a mission
- POST /api/stop - Stop a mission
- GET /api/flight-log/:flight_id - Get flight log details
- GET /api/flight-log/:flight_id/pdf - Get flight log as PDF
- Register and log in to obtain an authentication token.
- Use the token to authenticate requests for managing drones and missions.
- Create and manage drones and missions using the provided endpoints.
- Start and stop missions to simulate drone flights.
- Retrieve flight logs and download them as PDFs.