Skip to content

✨ Open-source repo for contributing to the Custom Authentication Service – built with Node.js, MongoDB, and secure architecture principles. πŸ›  Add features like OTP verification, improve rate limiting, or help scale it for distributed systems.

Notifications You must be signed in to change notification settings

YatharthKumarSaxena/Custom_Auth_Service_OpenSource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Custom Authentication Service – Open Contribution Repo

Hey there! I’m Yatharth Kumar Saxena, and over the last 30 days I hand-crafted a production-grade authentication service (🌟 296 commits, 4500+ lines of handwritten code). Now I’m opening the doors so the community can push it even further.


πŸ“‘ Table of Contents


πŸ“– Introduction

This repository is purely for external contributions. Think of it as the public workshop where we co-create new features, squash bugs, and polish the architecture. The original solo build lives here.

β€œSystem fails. Design survives.” β€” YKS


πŸ› οΈ What Went In

  • ⏳ 30 days of focused backend design & development.
  • βœ… 296 commits β€” every thought versioned.
  • πŸ“„ 4500+ lines of handwritten code (excluding Express.js boilerplate).
  • 🧠 17 APIs Β· JWT auth Β· device-aware sessions Β· rate limiting Β· single-admin model.

🧩 Current Architecture

Design Principles: SOLID Β· DRY Β· YAGNI Β· KISS
Design Patterns: Singleton Β· Factory Β· Template Method Β· Strategy Β· Chain-of-Responsibility

The service is microservice-ready and battle-tested for scalability.


πŸ—‚οΈ Folder Structure

Total files: 60+ (source, configs, docs, tests excluding node_modules folder)

πŸ“ /folder 🏷️ Description
configs/ πŸ› οΈ Environment & token configs
controllers/ 🧩 Route logic & orchestration
middlewares/ πŸ”— Auth, role, rate-limit chains
models/ πŸ—„οΈ Mongoose schemas
rate-limiters/ ⏱️ Custom limiter factories
services/ βš™οΈ Business logic abstractions
utils/ 🧰 Helper utilities
README.md πŸ—ΊοΈ You are here!

Every sub-folder contains its own README.md with deeper details. πŸ“


πŸ§‘β€πŸ’» Open Contribution Areas

  1. OTP Verification Workflow πŸ“²
    Goal: After sign-up, isActive stays false until user verifies a 6-digit OTP (email/SMS).
    Controller should wait up to 30 s for verification; else user re-requests OTP.
    Clean, modular design (consider pluggable microservice vs internal API).

  2. Forgot-Password API πŸ”‘
    Secure token/OTP flow β†’ password reset.

  3. Enhanced Logging πŸ“ˆ
    Structured logs, trace IDs, winston/pino integration.

  4. Performance & Reliability ⚑
    Caching, graceful shutdowns, horizontal scalability ideas.

  5. Bug Fixes / Refactors 🐞
    Anything that boosts maintainability, reliability, or availability.

Contributions must align with existing HLD/LLD and follow design principles.


🀝 How to Contribute

  1. Fork this repo ➜ create a feature branch.
  2. Run npm install & rename .env.sample ➜ .env.
  3. Write clean, commented code + unit tests.
  4. Create a PR referencing an open issue.
  5. Fill out the PR template (design rationale, test evidence).

Note: First-time OSS contributors welcome! πŸ™Œ


βš™οΈ Tech Stack & Principles

  • Node.js + Express.js (REST)
  • MongoDB/Mongoose (TTL indexes for cleanup)
  • JWT (access & refresh)
  • Cron jobs (log & account cleanup)
  • Rate Limiting (device/user aware)

Design mantra: clean code, clear contracts, scalable architecture.


🎯 Final Takeaway

This project started as my personal deep-dive into system design. Now it’s our playground to experiment, learn, and craft production-ready auth-tech together. Your smallest PR or biggest refactor β€” everything counts.

Looking forward to your valuable contributions! πŸ™

About

✨ Open-source repo for contributing to the Custom Authentication Service – built with Node.js, MongoDB, and secure architecture principles. πŸ›  Add features like OTP verification, improve rate limiting, or help scale it for distributed systems.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published