You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/assaidy/blogging_app

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/assaidy/blogging_app

v0.0.0-20250320193613-7ec62d402d9c
Source
Go
Version published
Created
Source

Blogging API

This project is a RESTful API for a Blogging platform. It provides features for user authentication, user management, post creation, commenting, reactions, bookmarks, notifications, and more.

Features

Authentication

  • User Registration: Register a new user account.
  • User Login: Authenticate and log in a user.
  • Access Tokens: Retrieve access tokens for authenticated sessions.

User Management

  • Get User by ID: Fetch user details by their unique ID.
  • Get User by Username: Fetch user details by their username.
  • Update User: Update user profile information.
  • Delete User: Delete a user account.
  • Get All Users: Retrieve a list of all users with optional filtering for searching.

Follow System

  • Follow User: Follow another user.
  • Unfollow User: Unfollow a user.
  • Get Followers: Retrieve a list of followers for a specific user.

Posts

  • Create Post: Create a new post.
  • Get Post: Fetch details of a specific post.
  • Update Post: Update an existing post.
  • Delete Post: Delete a post.
  • Get User Posts: Retrieve all posts by a specific user.
  • Get All Posts: Fetch all posts with optional filtering for searching.
  • View Post: Record a view for a specific post.

Comments

  • Create Comment: Add a comment to a post.
  • Update Comment: Edit an existing comment.
  • Delete Comment: Remove a comment.
  • Get Post Comments: Retrieve all comments for a specific post.

Reactions

  • React to Post: Add a reaction (like, dislike, etc.) to a post.
  • Delete Reaction: Remove a reaction from a post.

Bookmarks

  • Add to Bookmarks: Bookmark a post for later viewing.
  • Remove from Bookmarks: Remove a post from bookmarks.
  • Get All Bookmarks: Retrieve all bookmarked posts for the authenticated user.

Notifications

  • Get All Notifications: Fetch all notifications for the authenticated user.
  • Get Unread Notifications Count: Retrieve the count of unread notifications.
  • Mark Notification as Read: Mark a specific notification as read.

Getting Started

To get started with this project, follow these steps:

  • Clone the repository:

    git clone https://github.com/assaidy/blogging_app
    cd blogging_app
    
  • Set up environment variables: Rename .env_example to .env file in the root directory and change the necessary environment variables.

  • Run containers:

    make compose-up
    
  • Migrate:

make goose-up
  • Run the app:
make run

Technologies Used

  • Fiber: Web framework for building the API.
  • JWT (JSON Web Tokens): For user authentication.
  • PostgreSQL: Relational database for data storage.
  • Goose: Database migration tool for managing schema changes.
  • SQLC: SQL compiler and type-safe query generator for Go.
  • Docker Compose: Containerization and orchestration for local development and deployment,
  • Cursor Pagination: Implemented cursor-based pagination to minimize bandwidth usage and reduce server load, ensuring efficient data retrieval for large datasets.
  • Go Channels: Used as an asynchronous queue for background tasks and event processing.
  • Prefork: Enabled for load balancing and improved performance under high traffic.

FAQs

Package last updated on 20 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.