Skip to content

nealarch01/payaco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Payaco

A simple money transfer REST API.

Disclaimer: This is all play/fake money!!

Table of Contents:

  1. Technology Stack
  2. Initializing the Database
  3. Running the RestAPI
  4. API Documentation
  5. Useful Resources

Tech Stack

  • Language: Go
  • Framework: GorillaMux
  • Database: PostgreSQL (Version: 15.0)
  • Additional Technologies: JSON Web Tokens (JWTs)
  • Architecture: Model-View-Controller (MVC)

Additional Information:

  • The server does not use HTTPS
  • The default port (specified in main) is 8001
  • All endpoints except "/" will return application/json

Initializing the database

  • Create a PostgreSQL instance at any port (this project uses 4323)
  • A shell script setup.sh was provided and can be found in the database directory. Change the port number to your instance and run it. The shell file will create a database named "development", the tables, and populates it with sample data.
    • Note: this shell script uses zsh, if you use bash, modify the binary.

Running the REST API

You may use go run main.go (assuming you are inside ./rest-api directory). Alternatively, another shell script was provided that compiles the program into an executable and immediately runs if successful.

Note: navigate into ./rest-api/pkg/models/database.go and change your connection string if you are using a different port or database name.

API Endpoints

You may find the endpoint documentations at: Payaco API Documentation (Postman)

Useful Resources:

About

💰 Transactions REST API developed in Go with Gorilla/Mux and PostgreSQL

Resources

License

Stars

Watchers

Forks

Contributors