Skip to content
himanshugupta09Public

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

BlogIn — Niche Community Social Network

BlogIn is a modern, high-performance niche social network platform built with React, TypeScript, Tailwind CSS, and FastAPI. It enables creators, developers, spiritual seekers, and specialized communities to share content, engage through custom niche hashtags, and manage public or private connections without algorithmic noise.


🌟 Key Features

🚀 Public Landing Page & Frictionless Onboarding

  • LinkedIn-Style Landing Page: Welcomes unauthenticated visitors with featured topics, creator highlights, and community stats.
  • Custom Hashtag Selection: Pick initial interests (e.g., #Krishna, #Coding, #Bhakti, #FastAPI) during registration to instantly personalize your feed.
  • JWT Authentication: Smooth login and signup flows with instant token storage and session restoration.

📰 Personalized Feed & Post Management

  • Topic-Based Feed Filtering: Filter posts by followed or trending niche hashtags with instant search.
  • Full CRUD Post Capabilities:
    • Create: Publish posts with titles, formatted content, custom hashtag pills, and image attachments.
    • Edit (PUT /posts/{id}): Dedicated modal for authors to update post title, body, hashtags, image, and visibility.
    • Delete (DELETE /posts/{id}): Confirmation dialog to safely remove posts.
  • Engagement: Interactive like/unlike toggles and rich comment drawer.

👥 Follow & Unfollow Architecture

  • Follow System (POST /users/{user_id}/follow): Instant follow for public accounts, and pending request routing for private profiles.
  • Unfollow Confirmation (DELETE /users/{user_id}/follow): Popup confirmation dialog before unfollowing a user or cancelling a pending follow request.
  • Real-Time Follow Requests: Manage incoming follow requests with accept and decline controls.

👤 User Profiles & Privacy

  • Public & Private Accounts: Support for account privacy toggles and request-gated content.
  • Profile Customization: Update bio, display name, avatar, and preferred niche hashtags.
  • Follower & Following Modal: View connections and manage social graph.

🛠️ Tech Stack & Architecture

Frontend

  • Framework: React 18 + Vite
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Icons: Lucide React
  • State & Context: Custom AuthContext with persistent session restoration
  • HTTP Client: Axios with automatic Bearer Token interceptor & dual-mode FastAPI/Mock engine fallback

Backend (FastAPI Contract)

  • Framework: FastAPI (Python 3.10+)
  • Database: SQLAlchemy ORM (SQLite / PostgreSQL)
  • Security: OAuth2 with Password Bearer & JWT tokens
  • Real-time: WebSockets for live alerts (trigger_ws_alert)

🔌 API Endpoints Reference

Authentication (/auth)

| Method | Endpoint | Description | | shadow | --- | --- | | POST | /login | Authenticate user & return OAuth access token | | POST | /signup | Register new user account with niche preferences | | GET | /users/me | Fetch authenticated user profile |

Posts (/posts)

Method Endpoint Description
GET /posts Retrieve feed posts with optional hashtag filter
POST /posts Create new post with title, content, hashtags, and image
PUT /posts/{id} Update existing post details and image attachment
DELETE /posts/{id} Delete post by ID
POST /posts/{id}/like Toggle like status on a post

Users & Social Graph (/users)

Method Endpoint Description
GET /users/{username}/profile Get user profile details
POST /users/{user_id}/follow Follow user or send private follow request
DELETE /users/{user_id}/follow Unfollow user or cancel follow request
GET /users/me/follow-requests View pending incoming follow requests

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/blogin.git
    cd blogin
  2. Install frontend dependencies:

    npm install
  3. Configure Environment Variables: Copy .env.example to .env (optional):

    VITE_API_BASE_URL=http://localhost:8000
  4. Start the Development Server:

    npm run dev

    The application will run at http://localhost:3000.


📄 License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages