Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanuj1718/studysphere
This repository contains a full-stack web application that enables users to share their best learning content with a community. The platform allows users to register, log in, and create posts that include a title, content, and a link. This project aims to provide a centralized space for accessing valuable learning resources shared by the community.
https://github.com/tanuj1718/studysphere
go golang-package jwt-authentication mongodb-database nextjs tailwind
Last synced: 6 days ago
JSON representation
This repository contains a full-stack web application that enables users to share their best learning content with a community. The platform allows users to register, log in, and create posts that include a title, content, and a link. This project aims to provide a centralized space for accessing valuable learning resources shared by the community.
- Host: GitHub
- URL: https://github.com/tanuj1718/studysphere
- Owner: Tanuj1718
- Created: 2024-07-19T12:08:25.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-10T11:24:59.000Z (3 months ago)
- Last Synced: 2024-10-11T05:40:59.217Z (29 days ago)
- Topics: go, golang-package, jwt-authentication, mongodb-database, nextjs, tailwind
- Language: TypeScript
- Homepage: https://drive.google.com/file/d/16Sh35Sr6dzOH7T3XpjZ4r2szfR5btOWU/view?usp=drivesdk
- Size: 1.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LEARNING CONTENT SHARING PLATFORM
## Overview
This platform allows users to register, login, and share their best learning content with others. Users can create posts that include a title, content, and a link. The main goal is to provide a space where everyone can access valuable learning resources.
## Tech Stack
### Frontend
NextJs: Next.js is a React framework that enables server-side rendering and static site generation for building optimized and scalable web applications.Tailwind CSS: A utility-first CSS framework for rapid UI development.
### Backend
Go (Golang): The backend of the application is built with Go, a statically typed, compiled programming language designed for efficiency and reliability.MongoDB: A NoSQL database used to store user information and posts.
### Backend Details
Go (Golang)The backend server is implemented in Go, leveraging its performance and concurrency capabilities to handle user authentication and post management.
### Key components include:
Gorilla Mux: A powerful HTTP router and URL matcher for Go.
JWT (JSON Web Tokens): Used for securing routes and ensuring only authenticated users can create and view posts.
MongoDB Driver: The official MongoDB driver for Go, used for database operations.
CORS Handling
The backend includes CORS middleware to allow secure cross-origin requests from the frontend.
## Setup and Installation
**Clone the repository:**git clone https://github.com/Tanuj1718/Golang-Project2.git
**Frontend:**Navigate to the frontend directory:
cd Frontend
Install dependencies and start the development server:npm install
npm run dev
**Backend:**Navigate to the backend directory:
cd Authentication
Install dependencies:go mod tidy
Start the server:go run main.go
## Usage
Registration: Users can register by providing a username and password.Login: Users can log in using their registered credentials.
Create Post: Logged-in users can create posts with a title, content, and link.
View Posts: Users can view posts shared by others.
## API Endpoints
POST "/api/register": Register a new user.POST "/api/login": Login and receive a JWT token.
POST "/api/posts": Create a new post (requires JWT).
GET "/api/posts": Get all posts (requires JWT).
**Contributing**
Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.