What I built
I have build an open source social media backend api server using Golang, Gofiber and Mongodb native driver.
Category Submission:
Think Outside the JS Box
App Link
https://github.com/harshmangalam/mongogram-api
Description
Mongogram backend api build using mongodb driver and golang.
I have utilize gofiber which is based of fasthttp - fastest http server written in go and alternative to go http. I have implemented these features in mongogram
- Authentication
- Login
- Signup
- Accounts
- Change password
- Deactivate account
- Update profile
- Reset password
-
Media
- upload media in gridfs
- Fetch media from gridfs
-
Search
- Atlas search
- Fetch recent searches
- Clear specific recent search
- Empty recent searches
-
Post
- Create new post
- Fetch post lists
- Fetch post details
-
User
- Follow user
- Unfollow user
- Fetch user lists
- Fetch current user
- Fetch user profile
Link to Source Code
harshmangalam / mongogram-api
A social media rest api build with gofiber and mongodb
Mongogram
Social media backend api build with golang and mongodb
Features
-
Authentication
- Login
- Signup
-
Accounts
- Change password
- Deactivate account
- Update profile
- Reset password
-
Media
- upload media in gridfs
- Fetch media from gridfs
-
Search
- Atlas search
- Fetch recent searches
- Clear specific recent search
- Empty recent searches
-
Post
- Create new post
- Fetch post lists
- Fetch post details
-
User
- Follow user
- Unfollow user
- Fetch user lists
- Fetch current user
- Fetch user profile
Permissive License
MIT
https://github.com/harshmangalam/mongogram-api/blob/main/LICENSE
Background
Golang is getting popularity now a days in web and serverless. Many of the serverless , network related tools and libraries are developed using golang. Even ecosystem of go is getting mature day by day and with great open source developer community support on stackoverflow and DEV community. You can find wide variety of open source project and documentation related to go.
To develop any backend api we utilize language specific framework from where you expect better developer experience go have many backend framework that you can utilize to create api ie. Gorilla mux, Echo, Gofiber, Gokit etc...
Many database provide native drive support like Mongodb, Sqlite, Redis etc...
Golang have great concurrency support using channels and can scale to millions with little effort.
How I built it
I have utilize Mongodb Cloud to store documents related to users data and posts.
I have added search support for users profile in mongogram using mongodb atlas search.
I have utlize mongodb gridfs to store media chunks and files metadata.
Mongodb provide native go driver which have great support for vast majority of latest mongodb api.
Additional Resources/Info
https://www.mongodb.com/
https://www.mongodb.com/docs/drivers/go/current/
https://university.mongodb.com/
https://gofiber.io/
https://github.com/valyala/fasthttp
https://github.com/gofiber/fiber
https://awesome-go.com/database-drivers/
Top comments (0)