Introducing Vidverse – a dynamic, full-stack web application crafted with Golang (Go), Next.js, TypeScript, PostgreSQL, and a host of other cutting-edge technologies. Vidverse offers users a seamless experience to watch, like, comment, and engage with an eclectic array of content, and users can also authenticate using (credentials and social platforms).
Creators have the power to effortlessly share their latest videos and manage their content, while subscribers revel in curated feeds, saved favorites, and personalized watch histories. User can also see their notifications.
This is the back-end version. If you want to see the front-end part please visit here
Front End
- Nextjs
- React
- TypeScript
- Html
- CSS
- Tailwind CSS
Back End
- Golang
- PostgreSQL
- Gin
- Gorm
- Web Socket
- Firebase
- Project ScreenShot
- Users can authenticate using their credentials or through various social platforms, ensuring a flexible and convenient login experience.
- Creators can effortlessly share their latest videos and manage their content with ease, fostering a vibrant community of content producers.
- Subscribers enjoy curated feeds, saved favorites, and personalized watch histories, enhancing their viewing experience.
- Users receive notifications, ensuring they stay updated on the latest activities and interactions within the Vidverse community.
To get a local copy up and running, follow these steps.
In order to run this project you need:
-
Then Make sure you have installed Go (golang) version 1.20.4 or the latest stable version.
-
Then make sure you have installed PostgreSQL on your local machine if you want to use this project locally.
-
Then Create a database called
vidverse
-
First of all to see this project's graphical interface make sure you run the front-end part
- Clone this repository to your desired folder:
cd your-folder
https://github.com/raihan2bd/vidverse
-
Before running the project please make sure you create a
.env
or rename the.env.example
file to.env
file and update the following credentialsPORT=Your port number DB_URI="host=localhost user=postgres password=#Dovaridu90 dbname=vidverse port=5432 sslmode=disable" SECRET=yoursecret CLD_URI= your cloudinary uri CLOUD_NAME=your cloud name JWT_SECRET=your jwt secret ENVIRONMENT= your environment MAIL_DOMAIN= your mail domain MAIL_HOST= your mail host MAIL_PORT= your mail port MAIL_USERNAME= your mail username MAIL_PASSWORD= your mail password MAIL_ENCRYPTION= your mail encryption MAIL_FROM_NAME= your mail from name MAIL_FROM_ADDRESS= your mail from address
-
Then don't forget to create a service account to implement the social login. Then add your service account credentials inside a file called
service-account.json
make sure you add this file in your project root. see the Blog if you need more information about it.
To obtain the JWT secret key, please click here.
An open Go terminal is required. In the terminal, please copy the following code and paste it into your .env file.
Like this
JWT_SECRET="*******"
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
)
func main() {
// Define the desired length of the secret key in bytes
keyLength := 64 // Adjust the length as needed
// Create a byte slice to hold the random bytes
key := make([]byte, keyLength)
// Generate random bytes using crypto/rand
_, err := rand.Read(key)
if err != nil {
fmt.Println("Error generating random bytes:", err)
return
}
// Encode the random bytes in base64 to create a string
secretKey := base64.StdEncoding.EncodeToString(key)
fmt.Println("Generated JWT secret key:", secretKey)
}
Cloudinary is a cloud-based media management platform that helps businesses and developers efficiently store, manage, and deliver images and videos for websites and applications. It provides features like image and video uploading, storage, transformation, optimization, and content delivery via a content delivery network (CDN), making it easier to handle media assets in web and mobile applications. Cloudinary's services can enhance website performance, user experience, and streamline media asset workflows.
For using this you need to Create an account Or if you have an Account you need to Sign In
After that go into the Dashborad
Copy the Cloud Name and API Environment variable
CLD_URI="cloudinary://******"
CLOUD_NAME="****"
Install this project with:
- Install the required gems with:
go mod tidy
- Create the databases properly, You need to open an SQL editor and run the
/database/schema.sql
file script. Make sure you run the script block by block.
- To run the development server, execute the following command:
go run ./cmd/api/ .
- To build the project for production-ready run the following command:
go build -o main ./cmd/api/*.go
To deploy your project online You can visit Render
👤 Abu Raihan
- GitHub: @raihan2bd
- Twitter: @raihan2bd
- LinkedIn: raihan2bd
👤 Nurgul Kereikhan
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
- Implement improvements to provide users with an even smoother and more enjoyable experience.
- Transition the application to a microservices architecture for improved scalability and maintainability.
- Add a new feature called
Shorts
to the platform, enabling users to create and share short-form video content. - Incorporate FFmpeg to enhance video streaming capabilities similar to YouTube, and leverage AWS for hosting these files to ensure seamless playback and scalability.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project, please leave a ⭐️
We extend our heartfelt gratitude to Microverse and Trevor Sawler for their invaluable assistance in mastering the tech stack utilized in this project. Additionally, we express our sincere appreciation to Cloudinary for generously providing us with free cloud space.
This project is MIT licensed.