Skip to content

A small social network created with golang, gorilla/mux and gorm

Notifications You must be signed in to change notification settings

tombernardes/go-social-network

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A small social network created with golang, gorilla/mux and gorm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 61.8%
  • HTML 31.8%
  • JavaScript 2.4%
  • CSS 2.4%
  • Dockerfile 1.3%
  • Shell 0.3%