Categorygithub.com/damascus-mx/photon-api
repositorypackage
0.0.1-alpha.1
Repository: https://github.com/damascus-mx/photon-api.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Photon

Release Tag AGPL-3.0 Issues Languages Size

Photon is a platform where students can fetch their lab materials easier than ever.

In addition, Photon contains more functionalities like:

  • Lab management
  • Virtual classrooms
  • Statistics

The platform

The Photon platform is currently subdivided into 4 modules:

  • Photon for Students is intended to help students on their everyday. Improves material fetching and class management.
  • Photon for Teachers helps to manage classrooms and tasks/homework.
  • Photon for Labs is a sub-system where qualified personnel is able to manage warehouses.
  • Photon for Managers is a little module that retrieves useful data for decision-makers.

The API

Photon API v1 is using the Microservice pattern working along with the HTTP Protocol, turning it into a REST Microservice.

The API is not completely attached to the HTTP Protocol, it also uses Websockets and MQ Brokers for every need.

See the GODOC reference to see all the exposed resources -aka URIs-.

API Dependencies

Since Photon is using Go Modules for package management, the following dependencies are related to environment requirements.

Photon API v1 was developed with the following Programming Language(s) / Tool(s) versions:

  • Go 1.13
  • PostgreSQL 12
  • Redis 5.0.7

Architecture

Photon API's architecture is completely based on unclebob's clean architecture concept and is also using some concepts from bxcodec's Golang's clean architecture like Delivery layer.

If you want for information, check this article and this GitHub Repo.

Diagrams

alt text

unclebob's Clean Architecture

alt text

bxcodec's Golang's Clean Architecture

Code

Photon API v1 is currently using multiple architectrual / design patterns (repository, dependency injection, singleton, etc).

  • Bin: Intended to start all the required services -persistence, cron jobs, routers, env variables, etc-.

  • Core: Wraps the main application logic into one single package. It's meant to be reused during the application's lifecycle.

    • Config: Application's global configurations.
    • Helper: Wrapper for all 3-rd party services/libraries.
    • Middleware: Extra handlers as middlewares.
    • Util: Useful and completely reusable functions.
  • Entity: Contains all the entities required by business logic.

  • Infrastructure: Contains all volatile modules.

    • Delivery: Protocols for data delivery.
    • Handler: Functions triggered by delivery's layer patterns.
    • Repository: Handles all persistence's layer operations.
    • Service: Services required by the application.
  • Usecase: Main Business logic's Use cases

Deploy

Photon is inteded to use Travis CI, Docker, Docker Compose and Kubernetes for automated deploy & CI.

It is recommended to use AWS infrastructure using the following services:

  • Internet Gateway.- NAT Pool and ACLs for VPC.
  • VPC.- Virtual Private Cloud, isolates instances and services into a private cloud.
  • EC2.- Server instance service on the cloud, runs Photon's API binaries.
  • RDS.- Main Persistence layer, Relational Database instance service using PostgreSQL.
  • ElastiCache.- In-Memory persistence layer, uses Redis.
  • Lambda.- Cloud functions, triggers before and after a request -HTTP requests mostly-.
  • Other

Maintanance

Photon is mainly backed by Damascus Mexico Group, however, this project is currently under the following users' responsabilities: