Skip to content

daawaan4x/codemight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Codemight πŸ“š

Development

After cloning the repository, run the following commands to initialize the repo.

pnpm install		# install project dependencies
pnpm run prepare	# initializes husky, for git hooks

The following is a list of the primary scripts for the project.

pnpm run dev		# start development server
pnpm run build		# build project
pnpm run start		# start server for production
pnpm run lint		# lint codebase with ESLint
pnpm run tscheck	# typecheck codebase with Typescript
pnpm run format		# format codebase with Prettier

API

This project uses the following tech for the API.

  • tRPC: End-to-end type-safe client-server communication
  • Zod: Declarative data validation with user-defined schemas

An interactive documentation page for the tRPC API can be found at /api/trpc during development only.

tRPC API (formatted with tree.nathanfriend.com):

.
β”œβ”€β”€ ping: healthcheck server
β”œβ”€β”€ users/
β”‚   β”œβ”€β”€ find: 1 user
β”‚   β”œβ”€β”€ list: many users
β”‚   β”œβ”€β”€ create
β”‚   β”œβ”€β”€ update
β”‚   └── remove
β”œβ”€β”€ classes/
β”‚   β”œβ”€β”€ find: 1 class
β”‚   β”œβ”€β”€ list: classes where user has access
β”‚   β”œβ”€β”€ create
β”‚   β”œβ”€β”€ update
β”‚   └── remove
β”œβ”€β”€ problems/
β”‚   β”œβ”€β”€ find: 1 class
β”‚   β”œβ”€β”€ list: problems from all classes where user has access
β”‚   β”œβ”€β”€ create
β”‚   β”œβ”€β”€ update
β”‚   └── remove
└── solutions/
    β”œβ”€β”€ find: 1 solution
    β”œβ”€β”€ find_latest: latest solution for problem
    β”œβ”€β”€ list: authored solutions (? for a problem)
    β”œβ”€β”€ list_latest: latest solutions from all users for a problem
    └── create

Database

pnpm exec drizzle-kit studio		# start database gui client
pnpm exec drizzle-kit generate		# generate migration files
pnpm exec drizzle-kit migrate		# apply migration files

Database Schema (formatted with Jetbrains DataGrip)

Tooling

This project uses the following tools to enforce consistent coding conventions, formatting, and automated workflows:

Formatting & Linting

Automation

  • Github Actions: Automates CI workflows, including formatting & linting.

Contributors

In alphabetical order:

About

πŸ“š platform for coding education | made with next.js πŸ”Ό

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •