Gnasher API is a comprehensive backend system designed for villa booking and B&B bookings processes. It is built on Node.js and interacts with a MySQL database, providing a JSON API for various operations. The system is primarily focused on user management, project tracking, and integration with external data sources like Google Sheets.
- Booking Management: Create, read, update, and delete bookings information. Includes ability for maintenance and owner bookings
- Calendar Management: Manages the calendar of villas to profile a single point of calendaring
- Data Import: Import data from Google Sheets into the Snowy database, facilitating seamless integration of external data sources.
- Authentication: Secure routes with JWT-based authentication middleware.
- Error Handling: Centralized error handling for consistent API responses.
- API Documentation: Interactive API documentation using Swagger.
- Node.js: JavaScript runtime for building the server-side application.
- Express: Web framework for Node.js, used for routing and middleware.
- Sequelize: Promise-based ORM for Node.js, used for database operations.
- MySQL: Database system used for data storage.
- Swagger: API documentation and exploration tool.
- JWT (JSON Web Tokens): Used for secure authentication.
- Bcryptjs: Library for hashing and comparing passwords.
- Nodemailer: (Not visible installed yet) for sending emails, like password reset emails.
- Clone the repository.
- Install dependencies:
npm install
. - Set up your MySQL database and update the
./config/config.json
file with your database credentials. - Run the server:
npm start
. - Access the API at:
http://localhost:3000/
. - Explore the API documentation at:
http://localhost:3000/api-docs
.
./models
: Sequelize models for database tables../routes
: Express routes for handling API requests../controllers
: Controllers to handle the logic for each route../middleware
: Custom Express middleware, including authentication and error handling../utils
: Utility functions, including helpers for hashing passwords and managing import events../import-scripts-app-script
: Google Apps Script files for importing data../docs
: Swagger API documentation../config
: Configuration files, including database and Swagger setup.
- User Routes:
/users
for managing users. - Project Routes:
/projects
for managing projects. - Authentication Routes:
/auth
for user authentication.
- Expand testing suite for robustness.
- Implement rate limiting and additional security checks.
- Explore integration with additional external services.
Contributions to the Gnasher API are welcome. Please follow the standard fork-and-pull request workflow.
This project is all rights reserved.