Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create comprehensive/crud methods for our db that allow us to update UI on transactions automatically #31

Closed
nickheyer opened this issue Feb 15, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nickheyer
Copy link
Owner

Currently, only 5 of our DB models are even partially covered in terms of CRUD methods (create, read, update, delete). We should create files for each of our models, using prisma/schema.prisma as a reference for how we need to handle the incoming/outgoing data and it's relationships.

We need to standardize these methods and usages across the board, and preserve as much of prisma's ORM functionality as we can. Working out the relation and unique constraints might be challenging given various possible race conditions from this next part...

We need to introduce our websocket to our DB methods. Updating UI elements (compiling .pug templates at the component level and emitting via ws) will be infinitely more streamlined by letting our model files handle the UI updates.

Ie: DiscordMessage.create(.......); results in a new message appearing in the client, facilitated by HTMX and Websockets.

@nickheyer nickheyer converted this from a draft issue Feb 15, 2024
@nickheyer nickheyer added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 15, 2024
@nickheyer nickheyer moved this from Todo to In Progress in @nickheyer's DiscoFlix JS Complete Remake Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant