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

TS to Rust Server Rework; Muscles and Exercise APIs and (Unstyled) App Views #11

Merged
merged 135 commits into from
Dec 17, 2023

Conversation

rbondoc96
Copy link
Member

Description

This branch does a complete rework of the API server written in TypeScript. It is now written in Rust and is built using the axum crate.

In addition to reworking existing functionality, APIs for Muscles and Exercises (and related entities) have been created. The app displays them in the UI, but are minimally styled.

Exercises are populated using data from the Muscle Wiki website. This may change in the future as to avoid possible issues with using their API data.

rbondoc96 added 30 commits July 27, 2023 03:31
feat(rust-api): wip with login and register auth routes

build(rust-api): add session, cookies, and i10n deps

feat(rust-api): add session config, initial pass at cookies, and i10n strings

chore(rust-api): VSCode rust workspace settings

test(rust-api): add dev tests for login errors

feat(rust-api): add auth middleware and lang related constructs

feat(rust-api): add Context with user_id

perf(rust-api): move Context creation out of repeated extractor calls

feat(rust-api): add request logger

feat(rust-api): switch out user_id for User model in Context

fix(rust-api): session data in memory persisting when its DB record is gone

feat(rust-api): streamline json response generation

feat(rust-api): add password format validation during user registration

feat(rust-api): better errors for registration endpoint

feat(rust-api): add logout endpoint

feat(rust-api): add cors layer

perf(rust-api): avoid password encryption if user with email already exists

fix(rust-api): incorrect password verification

feat(rust-api): hide user id in response payload

feat(rust-api): add auth index endpoint

feat(rust-api): user_profile and generic Model SELECT functions

refactor(rust-api): move enums, lang, cookies, and middleware from root module

refactor(rust-api): move http-related modules into http module

refactor(rust-api): create utils module and move bcrypt and validator functions

refactor(rust-api): move common types to types module in project root

refactor(rust-api): Context is an Option and user is always required for it to exist

refactor(rust-api): move response module under http module as submodule

refactor(rust-api): move lang folder and translation helper to utils

refactor(rust-api): move server init code to dedicated module

refactor(rust-api): move root errors to its own submodule

refactor(rust-api): split out utility errors

refactor(rust-api): cleanup sys errors

refactor(rust-api): move base model code to its own module

refactor(rust-api): move route definitions to Controllers

refactor(rust-api): use sys-scoped Result

update(rust-api): generic no resource found error

update(rust-api): add Muscle and Link models, controllers, and resources

feat(rust-api): include user role in UserResource

feat(rust-api): add simple and list options to MuscleResource

refactor(rust-api): refine SQL syntax in migrations

feat(rust-api): restructure muscles table and populate in migration

feat(rust-api): add database connection to every model instance

refactor(rust-api): use DatabaseManager instead of DB pool directly

chore: add .idea folder to .gitignore

refactor(rust-api): move user and profile creation to actions

build(rust-api): add futures crate

refactor(rust-api): base ModelResource trait and apply to MuscleResource

update(rust-api): clean up auth handlers and add ProfileResource

build(rust-api): remove unused sqlb dep

feat(rust-api): create admin user if it does not exist

update(rust-api): implement ModelResource of Link

chore: update root package scripts
@rbondoc96 rbondoc96 self-assigned this Dec 17, 2023
@rbondoc96 rbondoc96 merged commit 6a10ce3 into pxeeio:main Dec 17, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant