CodeLibs Design
⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠
Excalidraw Data
Text Elements
Requirements
1
Core Entities
2
API
3
High-level
Design
4
Deep Dives
5
Primary Goal: Satisfy
Functional Requirements
Primary Goal: Satisfy
Non-functional Requirements
Functional Requirement
- Able to store user created code snippets in the data base (either public or private)
- Able to categories the snippets using personalised tags
- Able to add meta data and notes to the code snippet
- Include spaced repetition and active recall mechanism (Like Anki)
- Include a typing practice for users on their code snippets
- Able to search the wanted code from the public pool
- Able to comment, like, and start the public code snippet
- Purchase enable use to store more data, and private code
Non-functional Requirements
- Low Cost
- Low latency / high through put
- Consistent
- Availability
Out of scope:
- Search optimisation
- SEO
Core Entities
API
GET /login
API Gateway
- Nextjs
serverless
functions - Rate limit
Authentification
Database
(supabase)
Search
Purchase Storage
Stripe
Elasticsearch
(aws
opensearch)
cdc
Front-end
- Nextjs
-Shadcn UI
Event CRUD Service
Client
GET /signin
User
- id
- username
- password
- is_premium
Snippet
- id
- user_id
- collection_id
- title
- code
- is_public
- created_at
- updated_at
Collection
- id
- user_id
- name
- description
- is_public
- created_at
- updated_at
- template_snippet
Tag
- id
- name
Review
Comment
Likes
Stars
https://quizlet.com/au/416821268/past-the-shallow-character-quotes-flash-cards/?exitTest=1
Metadata
- id
- snippet_id
- key
- value
Create
Public
Library
Create
Public
Library
Create
Public
Library
language
title
Note
tage
Collection
Private/Public ...
Properties
All
Fav
Collections
Title
Time
code
tags
Search
Create
Public
Library
Create
Public
Library
Create
Public
Library
login
GET /code/codeId
/
/create
/library
/view/code-id