https://github.com/phanletrunghieu/simple-twitter
A very simple version of Twitter
https://github.com/phanletrunghieu/simple-twitter
golang graphql nextjs reactjs
Last synced: 2 months ago
JSON representation
A very simple version of Twitter
- Host: GitHub
- URL: https://github.com/phanletrunghieu/simple-twitter
- Owner: phanletrunghieu
- Created: 2020-02-15T05:35:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T07:21:24.000Z (over 2 years ago)
- Last Synced: 2025-01-28T15:14:09.222Z (4 months ago)
- Topics: golang, graphql, nextjs, reactjs
- Language: JavaScript
- Homepage: https://simpletwitter.tk
- Size: 9.1 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Twitter
A very simple version of Twitter (https://simpletwitter.tk)## Table of Contents
* [About the Project](#about-the-project)
* [Built With](#built-with)
* [Getting Started](#getting-started)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Architect](#Architect)
* [Current Architect](#current-architect)
* [Scale Architect](#scale-architect)
* [Contact](#contact)## About The Project
### Built With
* [Golang](https://golang.org)
* [GraphQL](https://gqlgen.com)
* [NextJs](https://nextjs.org), [Redux](https://redux.js.org)
* [Docker](https://docs.docker.com)## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
* NodeJs v10.16.3 and up
* Golang 1.12 and up
* Docker 19.03.5 and up
* Docker Compose 1.24.1 and up### Installation
**1. Backend**
```
cd backend
```**1.1. Setup database (Postgres & Redis)**
```
make local-db
```
Import `db.sql` file to `postgres` container**1.2. Run server**
```
make run
```
**2. Frontend**```
cd frontend
```**2.1. Install modules**
```
yarn install
```
**2.2. Start app**
```
yarn dev
```## Architect
### Current Architect

### Scale Architect
For scaling the system that can serve milions of users, we can:
- Deploy API server with many instance and loadbalance for requests.
- Deploy databases with master/slave architecture.
- Store data in `tweets` table with sharding by location. Ex: Tweets created by Vietnamese is stored in server in Vietnam,
tweets created by Singaporean is stored in server in Singapore.
## Contact
Hiếu Phan - [email protected]