cshare-server

command module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 7 Imported by: 0

README ΒΆ

Logo

πŸ“‹ Table Of Content

πŸ” Overview

cShare is a command-line utility built in Golang to send sensitive text data across devices. This repository is the backend server of cShare.

The back end is featured with

  • RESTful APIΒ for communication.
  • UserΒ authenticationΒ andΒ authorization
  • Secure resource endpoints usingΒ JSON Web Tokens (JWT)
  • Single-file binary.
  • Containerized environment for portability and scalability.
  • API documentationΒ using Postman

Technologies used

  • Go is the primary backend code.
  • PostgresSQL is the primary database for storing user authentication details, user data, and clip data.
  • Docker for containerizing and packaging software.

Framework used

  • Gin framework is the primary tool for building RESTful APIs.
  • cypherDecipher for password salting and un-salting.

🟒 Status

The backend (this project) is at stable version v1. It provides basic API endpoints for daily use. The official frontend command-line application is currently in development. You can also build your custom frontend(GUI, CLI or TUI) on top of this backend by following the docuementations.

πŸ“Š Digrams

πŸ—„ Database ER Digram

Refer ER digrams here

πŸ”§ Usage

Before you ping the endpoints, Follow the steps to setup the inital configuration of the application.

πŸ›  System Prerequisite

NOTE: The entire application was developed only using Go and Docker installed in the system. PostgreSQL databases were running in Docker containers.

πŸš€ Running Locally

  1. Clone the repository JammUtkarsh/cshare-server
git clone https://github.com/JammUtkarsh/cshare-server
  1. Change directory to cshare-server
cd cshare-server
  1. Generate the .env file. It contains preferences depending upon development/debug or deployment/production. .env.local has default preferences for production.
cp .env.local .env 
πŸ’Ύ Starting the server database container

A. Using docker-compose

sudo docker compose up --build

B. Using pre-built image

# running databse with preconfigured tables.
docker volume create pgdata
docker pull jammutkarsh/cshare-db

docker run --rm -p 5432:5432 -v pgdata:/var/lib/postgresql/data jammutkarsh/cshare-db
# or

# OR

# building and running the container..
docker build -t cshare-db --target=database .

docker run --rm -p 5432:5432 -v pgdata:/var/lib/postgresql/data cshare-db
πŸƒβ€β™‚οΈ Running The Application
go run .

The server will be now be accessable on port :5675 or as per the .env file

πŸ“š API Documentation

See Postman API Documentation

Use Run In Postman on top right corner for best experience.

🀝 Contribution

This project is for learning purposes. Although you still can open issues if you find any. If possible, mention minimum amount of steps to reproduce the issue in the issue tab

πŸ™ Acknowledgement

I would like to give special thanks to the Go community, especially the Discord Community

πŸ“œ License

cShare is MIT Licensed

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL