Giter VIP home page Giter VIP logo

portal's Introduction

Portal

Build Status

A social media web app powered by React, Gin, gRPC, and much more.

Homepage

alt text

Overview

Service Architecture

The portal application is split into services: auth, file, frontend, user, and post. These services communicate via gRPC and Protocol Buffer messages, defined here. All code not run in the browser is written in Go, but since each service runs in its own isolated Docker container and uses gRPC, they could be implemented in any supported language. The application uses the RDBMS MySQL and Object Storage Platform Minio for data storage.

Frontend Service

The frontend service is split into two parts, a web app and a REST API that provides clients controlled access to the other services.

Web App

The web app is written with React, and uses a package-based architecture. Each package here, has a specific function, and contains all the state and UI management code needed for that function, or it is used as a build block for other packages. The app follows the Flux architecture, and uses Redux, Redux Saga, and a number of other libraries to accomplish this. It also uses styled components instead of stylesheets.

REST API

The REST API is a Go app that uses the Gin framework for routing. It serves the web app and provides routes for accessing user and post data here. These routes validate requests and call controllers that make necessary gRPC calls to the other services.

Auth Service

The auth service manages hashing and storing user passwords and admin data. It uses a MySQL table to manage this data, and has gRPC server handlers for accepting requests.

File Service

The file service manages uploading and fetching files. It uses Minio, an open source object store, and gRPC streams for its file data to accomplish this.

User Service

The user service manages user data such as name, description, and followers/following and fetching files. It uses two MySQL tables to manage this data, and has gRPC server handlers for accepting requests.

Post Service

The post service manages user's posts, comments, and likes. It uses several MySQL tables to manage this data, and has gRPC server handlers for accepting requests.

Setup

  1. Install Docker Compose
  2. Clone this repo: git clone https://github.com/mewil/portal
  3. Change directory to the deploy repo: cd portal/deploy
  4. Start whatever environment you want
    • Development docker-compose -f development.yml up -d
      • Your git repo will be linked to the development environment, so your local changes will be reflected with a container restart
    • Production (more ENV data required) docker-compose -f production.yml up -d
      • NOTE: This takes care of setting up NGINX AND LetsEncrypt with the appropriate hosts and auto renewal
  5. Access http://localhost:8000 and start developing! To view application logs, run docker-compose -f development.yml logs -f

portal's People

Contributors

dependabot[bot] avatar mewil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

renowncoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.