A simple Go-based web application for booking time slots, designed for wash services or similar appointment-based businesses.
- User registration and management
- Time slot booking system
- RESTful API endpoints
- In-memory storage (suitable for development/demo)
- Clean architecture with separated handlers, services, and storage layers
- Ensure you have Go 1.23.3 or later installed.
- Clone the repository:
git clone https://github.com/yourusername/gowash.git cd gowash - Install dependencies:
go mod download
Run the application:
go run cmd/app/main.goThe server will start on http://localhost:8080.
- POST
/user- Registers a new user
- Body: JSON with user details (email, password, username, address)
- POST
/booking- Books a time slot for a user
- Body: JSON with user_id and time_slot_id
gowash/
├── cmd/app/ # Application entry point
├── internal/
│ ├── handlers/ # HTTP request handlers and routing
│ ├── models/ # Data models (User, Booking, TimeSlot)
│ ├── services/ # Business logic layer
│ └── storage/ # Data storage layer (in-memory implementation)
├── go.mod # Go module file
└── README.md # This file
- github.com/google/uuid - For generating unique IDs
This project uses a clean architecture approach:
- Handlers: Handle HTTP requests and responses
- Services: Contain business logic
- Storage: Abstract data persistence (currently in-memory)
- Models: Define data structures
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source. Please check the license file for details.