Skip to content

code-1py/Fukray

Repository files navigation

Discord Community Website — Backend

Backend for a Discord community website built as a backend-focused learning project using FastAPI and MongoDB Atlas.

The project includes authentication, JWT handling, protected admin routes, quote management, and crew member data handling.

Features

  • JWT Authentication
  • Password Hashing
  • Secure Cookie-Based Auth
  • Session-Based Login Attempt Tracking
  • Account Blocking After Multiple Failed Attempts
  • Quote Posting & Deletion
  • Crew/Admin Protected Routes
  • MongoDB Atlas Integration
  • Automatic JWT Validation
  • Tamper & Expiry Detection

Tech Stack

  • FastAPI
  • Pydantic
  • MongoDB Atlas
  • JWT Authentication
  • Python Sessions
  • Password Hashing
  • Render Deployment

Authentication Flow

  • User logs in through admin panel
  • Password is verified using hashing
  • JWT token is generated with 15-minute expiry
  • Token is stored securely in cookies
  • auth_check route validates JWT automatically
  • Invalid or expired tokens result in automatic cookie deletion
  • Sessions track failed login attempts
  • Account gets temporarily blocked after 3 wrong attempts

Security Features

  • JWT expiry system
  • HTTP cookie authentication
  • SameSite=None cookie configuration for frontend-backend communication
  • Password hashing
  • Session-based brute-force protection
  • Automatic invalid token cleanup

Database

MongoDB Atlas is used for:

  • Admin credentials
  • Quotes storage
  • Crew member data

API Functionalities

Auth

  • Login
  • Logout
  • JWT validation
  • Session tracking

Quotes

  • Add quote
  • Delete quote
  • Fetch quotes

Crew

  • Crew member data
  • Instagram links
  • Avatar storage

Deployment

  • Frontend deployed on Vercel
  • Backend deployed on Render

Cross-origin authentication was handled using secure cookie configuration with SameSite=None.

Project Goal

This project was primarily created as a backend learning project focused on:

  • authentication systems
  • API security
  • JWT handling
  • cookie-based auth
  • database integration

The frontend was intentionally kept simple and AI-assisted so development focus could remain on backend engineering and functionality.

Preview

Homepage

Homepage Screenshot

Crew Members Section

Crew Section

Quotes Section

Quotes Section

Admin Login

Admin login

Admin Panel

Admin Panel

Live Demo

Visit the live website here:

https://fukray.vercel.app/

Project Architecture

Frontend:

  • HTML
  • CSS
  • JavaScript
  • AI-assisted UI development
  • Hosted on Vercel

Backend:

  • FastAPI
  • Pydantic
  • MongoDB Atlas
  • JWT Authentication
  • Hosted on Render

About

Fukray Website Backend

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Contributors

Languages