Skip to content

cevrimxe/appointment-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

  β–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ          β–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 
 β–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆ  β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆ     β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆ   β–ˆβ–ˆ           β–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ   β–ˆβ–ˆ   
β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ  β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆ β–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆ   
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ     β–ˆβ–ˆ     β–ˆβ–ˆ  β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ  β–ˆβ–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆ     β–ˆβ–ˆ  β–ˆβ–ˆβ–ˆ   β–ˆβ–ˆ          β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ       β–ˆβ–ˆ   
β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆ     β–ˆβ–ˆ      β–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ   β–ˆβ–ˆ          β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆ     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 

license last-commit repo-top-language repo-language-count

Built with the tools and technologies:

Go Gin YAML

πŸ’§ Table of Contents

Table of Contents

🌊 Overview

The Appointment API is a comprehensive REST API service built with Go and Gin framework, designed to manage appointments, users, and services in a multi-tenant environment. This system provides a robust backend for scheduling applications, supporting features like user authentication, appointment management, service categorization, and payment processing. It's built with scalability and security in mind, using modern Go practices and a clean architecture approach.


πŸ’¦ Features

  • πŸ” Multi-tenant Architecture: Support for multiple business entities with isolated data
  • πŸ‘₯ User Management: Complete user authentication and authorization system
  • πŸ“… Appointment Scheduling: Flexible appointment booking and management
  • πŸ’Ό Service Management: Categorization and management of services
  • πŸ’³ Payment Processing: Integrated payment handling system
  • πŸ“± Device Management: Support for multiple devices and notifications
  • βš™οΈ Settings Management: Customizable system settings per tenant
  • πŸ“Š Reporting: Built-in reporting capabilities
  • πŸ”„ CORS Support: Cross-Origin Resource Sharing enabled
  • πŸ“ Logging: Comprehensive logging system
  • πŸ”’ Security: JWT-based authentication and middleware protection

πŸ”΅ Project Structure

└── appointment-api/
    β”œβ”€β”€ README.md
    β”œβ”€β”€ admin-endpoints.md
    β”œβ”€β”€ adminedit.md
    β”œβ”€β”€ appointment-api
    β”œβ”€β”€ cmd
    β”‚   └── server
    β”œβ”€β”€ config.env
    β”œβ”€β”€ endpoints.md
    β”œβ”€β”€ go.mod
    β”œβ”€β”€ go.sum
    β”œβ”€β”€ internal
    β”‚   β”œβ”€β”€ api
    β”‚   β”œβ”€β”€ config
    β”‚   β”œβ”€β”€ middleware
    β”‚   β”œβ”€β”€ models
    β”‚   β”œβ”€β”€ repository
    β”‚   └── services
    β”œβ”€β”€ migrations
    β”‚   β”œβ”€β”€ 001_public_schema.sql
    β”‚   └── 005_complete_tenant_schema.sql
    └── tests
        β”œβ”€β”€ README.md
        └── test_runner.go

πŸ”· Project Index

APPOINTMENT-API/
__root__
β¦Ώ __root__
File Name Summary
go.sum Go module dependency checksums
appointment-api Main executable binary file
go.mod Go module definition and dependency management
cmd
β¦Ώ cmd
server
β¦Ώ cmd.server
File Name Summary
main.go Application entry point and server initialization
migrations
β¦Ώ migrations
File Name Summary
001_public_schema.sql Initial database schema setup
005_complete_tenant_schema.sql Multi-tenant schema implementation
internal
β¦Ώ internal
api
β¦Ώ internal.api
File Name Summary
auth_handler.go Authentication and authorization request handlers
handlers.go Common API request handlers and utilities
admin_handler.go Administrative endpoints and operations
public_handler.go Public API endpoints and handlers
config
β¦Ώ internal.config
File Name Summary
config.go Code>❯ REPLACE-ME
repository
β¦Ώ internal.repository
File Name Summary
payment_repository.go Code>❯ REPLACE-ME
contact_repository.go Code>❯ REPLACE-ME
device_repository.go Code>❯ REPLACE-ME
user_repository.go Code>❯ REPLACE-ME
repository.go Code>❯ REPLACE-ME
category_repository.go Code>❯ REPLACE-ME
settings_repository.go Code>❯ REPLACE-ME
service_repository.go Code>❯ REPLACE-ME
appointment_repository.go Code>❯ REPLACE-ME
specialist_repository.go Code>❯ REPLACE-ME
middleware
β¦Ώ internal.middleware
File Name Summary
auth.go Authentication middleware for request validation
tenant.go Multi-tenant request processing middleware
logging.go Request logging and monitoring middleware
cors.go Cross-Origin Resource Sharing configuration
services
β¦Ώ internal.services
File Name Summary
tenant_service.go Code>❯ REPLACE-ME
contact_service.go Code>❯ REPLACE-ME
category_service.go Code>❯ REPLACE-ME
specialist_service.go Code>❯ REPLACE-ME
payment_service.go Code>❯ REPLACE-ME
device_service.go Code>❯ REPLACE-ME
tenant_cache.go Code>❯ REPLACE-ME
user_service.go Code>❯ REPLACE-ME
service_service.go Code>❯ REPLACE-ME
upload_service.go Code>❯ REPLACE-ME
appointment_service.go Code>❯ REPLACE-ME
services.go Code>❯ REPLACE-ME
settings_service.go Code>❯ REPLACE-ME
auth_service.go Code>❯ REPLACE-ME
models
β¦Ώ internal.models
File Name Summary
settings.go Code>❯ REPLACE-ME
payment.go Code>❯ REPLACE-ME
device.go Code>❯ REPLACE-ME
category.go Code>❯ REPLACE-ME
user.go Code>❯ REPLACE-ME
report.go Code>❯ REPLACE-ME
contact.go Code>❯ REPLACE-ME
tenant.go Code>❯ REPLACE-ME
appointment.go Code>❯ REPLACE-ME

πŸ’  Getting Started

πŸ…ΏοΈ Prerequisites

This project requires the following dependencies:

  • Programming Language: Go
  • Package Manager: Go modules

πŸŒ€ Installation

Build appointment-api from the source and intsall dependencies:

  1. Clone the repository:

    ❯ git clone https://github.com/cevrimxe/appointment-api
  2. Navigate to the project directory:

    ❯ cd appointment-api
  3. Install the dependencies:

    ❯ go mod download
  4. Build the project:

    ❯ go build ./cmd/server

πŸ”Ή Usage

  1. Configure your environment: Create a config.env file in the root directory with your configuration settings. Here's an example:

    # Database Configuration
    DB_HOST=localhost
    DB_PORT=5432
    DB_USER=postgres
    DB_PASSWORD=your_password
    DB_NAME=appointment_db
    DB_SSLMODE=disable
    
    # Server Configuration
    SERVER_PORT=8080
    
    # JWT Configuration
    JWT_SECRET=your-secret-key
    
    # App Configuration
    APP_ENV=development
    APP_DEBUG=true
    
    # Cloudinary Configuration (Optional - for file uploads)
    CLOUDINARY_CLOUD_NAME=your_cloud_name
    CLOUDINARY_API_KEY=your_api_key
    CLOUDINARY_API_SECRET=your_api_secret
  2. Start the server:

    ❯ ./appointment-api

    Or run directly with Go:

    ❯ go run ./cmd/server
  3. Access the API: The API will be available at http://localhost:8080 by default (or the port specified in your config)

❄️ Testing

Appointment-api uses Go's built-in testing package with testify assertions for enhanced testing capabilities. Run the test suite with:

Using go modules:

go test ./...

🧊 Roadmap

  • v1.0.0: Core API implementation with basic appointment and user management
  • v1.1.0: Advanced scheduling features with recurring appointments
  • v1.2.0: Enhanced reporting and analytics
  • v1.3.0: Mobile app integration with push notifications
  • v2.0.0: Real-time scheduling and instant notifications

βšͺ Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/cevrimxe/appointment-api
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


⬜ License

Appointment-api is protected under the LICENSE License. For more details, refer to the LICENSE file.


✨ Acknowledgments

  • Thanks to the Go community for excellent documentation and support
  • Gin Web Framework for providing a robust foundation
  • JWT-Go for secure authentication
  • All contributors who have helped shape and improve this project
  • Special thanks to the open source community for inspiration and shared knowledge


About

A RESTful appointment management API built with Go. Features JWT authentication, PostgreSQL database integration, and real-time email notifications. Handles scheduling, managing, and tracking appointments with role-based access control for users and administrators.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages