Skip to content

Creating and managing code snippets with version control, and sharing features.

Notifications You must be signed in to change notification settings

udhayakumarth/codegists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeGists πŸ—ƒ

A lightweight and flexible code snippet manager with built-in version control, public & secret snippets, and multi-file support.

✨ Key Features

βœ” Version Control – Keep track of snippet changes over time.
βœ” Supports Multiple Files – Each snippet can have multiple associated files.
βœ” Public & Secret Snippets – Share code with the world or keep it private.
βœ” Google Authentication – Secure login with Google OAuth.

πŸ› οΈ Architecture

Architecture Diagram

πŸ“œ API Documentation

πŸ”— Postman API Docs: (https://documenter.getpostman.com/view/21272460/2sAYXEFJpg)

🎨 UI Design

πŸ”— Figma Prototype: (https://www.figma.com/design/zNWijW6x66dZ4hgGOKQDOQ/CodeGists)

πŸ—„οΈ Database Design (MongoDB)

Collections:
πŸ“‚ snippets πŸ“‚ files
πŸ“‚ versions πŸ“‚ users

πŸ“‘ API Endpoints

Authentication

  • GET /api/auth/login/google – Login via Google
  • GET /api/auth/login/google/callback – Handle Google OAuth callback

Snippets

  • GET /api/snippets/{userName} – Fetch all snippets by user
  • GET /api/snippets/{userName}/{snippetId} – Fetch a specific snippet
  • POST /api/snippets/{userName} – Create a new snippet
  • PUT /api/snippets/{userName}/{snippetId} – Update a snippet
  • DELETE /api/snippets/{userName}/{snippetId} – Delete a snippet

Files

  • GET /api/files/{userName}/{snippetId} – Fetch all files in a snippet
  • GET /api/files/{userName}/{snippetId}/{fileId} – Fetch a specific file
  • GET /api/files/{userName}/{snippetId}/versions – Fetch snippet version history
  • POST /api/files/{userName}/{snippetId} – Upload a new file
  • PUT /api/files/{userName}/{snippetId}/{fileId} – Update a file
  • DELETE /api/files/{userName}/{snippetId} – Delete a file

About

Creating and managing code snippets with version control, and sharing features.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published