A simple appointment booking API built with Golang, Gin, and MongoDB. 📅
✨ Features
-🔐 User authentication (JWT-based)
-📌 Create, update, and cancel appointments
-🕒 Fetch available time slots
-👥 Role-based access (Users & Admins)
-🗄️ MongoDB for persistent storage
-🛠️ Tech Stack
Backend: Golang, Gin 🦍
Database: MongoDB 🍃
Authentication: JWT 🔑
⚙️ Installation
Clone the repository:
git clone https://github.com/yourusername/GrozaGoBook.git
cd GrozaGoBook
Install dependencies:
go mod tidy
Set up environment variables in a .env file:
MONGO_URI=mongodb://localhost:27017/appointments
JWT_SECRET=your_secret_key
Run the application:
go run main.go
🔥 API Endpoints
🔑 Authentication
POST /register – Register a new user
POST /login – Authenticate and get a JWT token
📅 Appointments
GET /appointments – Get all appointments
POST /appointments – Create an appointment
PUT /appointments/:id – Update an appointment
DELETE /appointments/:id – Cancel an appointment
👨💼 Admin
GET /admin/users – Get all users (Admin only)
🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first. 🛠️ This project is licensed under