https://github.com/dsa0x/go-social-network
A small social network created with golang, gorilla/mux and gorm
https://github.com/dsa0x/go-social-network
go golang gorm postgresql social-network
Last synced: about 1 year ago
JSON representation
A small social network created with golang, gorilla/mux and gorm
- Host: GitHub
- URL: https://github.com/dsa0x/go-social-network
- Owner: dsa0x
- Created: 2020-08-15T15:02:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-14T18:39:05.000Z (about 4 years ago)
- Last Synced: 2024-06-19T05:36:13.695Z (about 2 years ago)
- Topics: go, golang, gorm, postgresql, social-network
- Language: Go
- Homepage:
- Size: 15.3 MB
- Stars: 34
- Watchers: 4
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chipper :: go-social-network

# Introduction
This is a mini social network created with golang, gorilla/mux and gorm. I built this to get more familiar with the Go language.
I also decided to use go template just to get familiar with them. I'll probably go with rest apis for future projects.
I intend to do some refactoring later on, but the functionalities are currently working. Feel free to fork it or make some suggestions to the current implementation.
Inspiration gotten from yTakkar's .
The website is live at https://chipper.daredev.xyz
# Requirements
Go - from v1.2
PostgreSQL - from v10
# Setup
- Before setup, you must have PostgreSQL on your machine. Then clone this repository
> https://github.com/dsa0x/go-social-network.git
- cd into the project directory
> cd go-social-network
- Set environment variables
- A sample is presented in the repository.
> cp .env.example .env
- Run application
> go run main.go
# Usage
Endpoint | Usage
------------ | -------------
/ | The Home page. It also lists the posts of all users
/signup | Use this route to sign up a new user
/login | Authenticate user to access protected endpoints
/user/{id} | The User profile. Also showing the number of posts, followers, and followings of the user
/logout | Logout the user
/user/follow | To follow a user
/user/unfollow | To unfollow a user
/users | Displays a list of all users
/post/create | To create a new post
/post/{id}/update | status.NotYetImplemented