Skip to content

Latest commit

 

History

History
182 lines (101 loc) · 8.17 KB

README.md

File metadata and controls

182 lines (101 loc) · 8.17 KB

A complete breakdown of the package.json

Scripts

dev: Used to generate GraphQL types and run the Next server at the same time. build: Used to build the Next server. start: Used to start the Next server. (Optionally we can change this to use next export to save the server as HTML) lint: Used to lint the project. codegen: Used to generate codegen files. codegen:watch: Used to automatically generate codegen files when files change.

Production Packages

All packages added should have their reason added here. This project should have minimal dependencies.

It's easiest to presume @types/* sub-packages are for TypeScript type definitions.

TypeScript is a typed variant of JavaScript that nudges developers closer to developing more terse code with its static type checking.

Sub-packages

React is used as a common base to build the UI of the project. It was chosen as it has a strong ecosystem and community-support network.

Sub-packages

NextJS is used in this project to allow easy routing with React, API routes, and integration with TypeScript. This is the main glue that allows us to develop the frontend and backend on the same repository.

Sub-packages

Material UI is chosen as a base template to help build out the styles and functionality of components in an opinionated way across the site. When you build components for this site you should ALWAYS use Material UI components before even thinking about creating your own component. This is to prevent 1-million different implementations of a modal.

Sub-packages

VSCode Extension Requirements

  • Prisma
  • SQLite (Only if you want to view the database in VSCode)

Prisma is our interface with the database that handles the schema, migrations, queries, and connection. This will be the only way you interact with the database in this project (aside from viewing the sqlite database in a viewer while testing).

VSCode Extension Requirements

The query language used to interact with our Apollo server. Heavily simplifies querying and types for a better developer experience.

Sub-packages

Our GraphQL server that heavily simplifies querying and types.

A hook-based approach to interacting with the graphql API. Anywhere you need to interact with the api should use this in the form of either useQuery (get something) or useMutation (change something).

A wrapper for the yt-dlp binary that saves us a whole bunch of pain when operating on a number of operating systems.

Sub-packages

For reading & parsing mime types without having to write our own parser & types.

@todo - We should replace this with some FFMPEG wrap. For reading metadata from audio files without having to write our own parser.

For reading image dimensions without having to write our own parser.

For reading the magic number of files to get mime types and extensions.

Sub-packages

For getting files as streams compatible with file-type.

A nice UI for playing audio. We can probably remove this once we focus more on developing our own UI.

Sub-packages

VSCode Extension Requirements

To force you to develop correctly by introducing linting rules and more static tests.

A large collection of hooks you would eventually make anyway but it gets maintained for free by someone else 🤑💰💲💸.

Before introducing a new hook, check it doesn't already exist in this library.

Easily do deep merges of objects and arrays. Quick and easy implementation without having to upkeep it or worry about performance.

Development Packages

Sub-packages

Used to generate types for the GraphQL API interface. This is so we don't have to re-write the graphql types in TypeScript.

Used to run multiple scripts at once. For example, we want to run codegen and our Next server at the same time during development.

For injecting scripts before you commit to make sure you aren't committing garbage.

To inject scripts onto specifically the staged files in git.

To format your code on commit so we don't have to worry about people conforming to a specific style. You will conform!

Sub-packages

To test our application works as expected and easily detect bugs.