Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vaibhavvikas/stay-sorted-go
Stay-Sorted is a web application that allows users to create and manage property listings, make reservations, and search for available properties. The application provides user authentication, property management, and reservation handling.
https://github.com/vaibhavvikas/stay-sorted-go
api gin go golang gorm microservices middleware rest-api
Last synced: 15 days ago
JSON representation
Stay-Sorted is a web application that allows users to create and manage property listings, make reservations, and search for available properties. The application provides user authentication, property management, and reservation handling.
- Host: GitHub
- URL: https://github.com/vaibhavvikas/stay-sorted-go
- Owner: vaibhavvikas
- License: mit
- Created: 2023-04-28T20:54:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-01T07:53:28.000Z (over 1 year ago)
- Last Synced: 2024-11-11T05:43:51.656Z (2 months ago)
- Topics: api, gin, go, golang, gorm, microservices, middleware, rest-api
- Language: Go
- Homepage: http://vaibhavvikas.ml/stay-sorted-go/
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stay-sorted
Stay-Sorted is a web application that allows users to create and manage property listings, make reservations, and search for available properties. The application provides user authentication, property management, and reservation handling.
## Features
### Completed
- User authentication: users can sign up, log in, and log out of the application
- Property management: users can create, update, and delete their property listings
- Property search: users can search for available properties based on location and amenities### TODO:
- Reservation handling: users can make reservations for available properties and view their reservations
- Admin panel: an admin user can manage all the listings and reservations in the application## Technologies
Stay-Sorted is built using the following technologies:
- Go: the programming language used to build the backend of the application
- Gin: a web framework for Go that provides routing, middleware, and handlers
- GORM: an Object-Relational Mapping (ORM) library for Go that provides a high-level interface for interacting with databases
- PostgreSQL: a relational database used to store the application data## Project Features
- Proper project structure following Golang Standards
- Use of middlewares for proper authentication, cors and request handling
- Use of proper error messages and error handling using the middlewares
- Separating the json Request and Response objects from the entities object to show only the required results to users
- Code is divided into controllers with each controller handling validators, service, and transformers to sepearate the business logic from code logic
- Using .env file to handle various environment secrets like database credentials, JWT secret keys
- Using utils for common functions## Installation
To install and run Stay-Sorted on your local machine, follow these steps:- Clone the repository: git clone https://github.com/vaibhavvikas/stay-sorted-go.git
- Install Go, PostgreSQL, and any other dependencies needed by the application
- Create a new PostgreSQL database for the application
- Update the database connection information in .env file
- Start the application: go run .
- The application should now be running at http://localhost:5000.## API Endpoints
Stay-Sorted provides the following API endpoints:### Completed
- /api/users/signup: creates a new user account
- /api/users/login: logs in an existing user and returns a JWT token
- /api/users/:user_pid: returns details for the specific user
- /api/houses/create: create a listing for a specific property
- /api/houses/:house_pid: returns details for a specific property (requires used to be logged in)
- /api/houses: returns a list of all houses.
- /api/houses/filter: filters for properties based on various params sucg as city, pincode, min/max price etc.### TODO:
- Reservations related api## License
Stay-Sorted is licensed under the MIT License. See the LICENSE file for more information.