Code Monkey home page Code Monkey logo

lib-webe's People

Contributors

webewizard avatar

Watchers

 avatar  avatar

lib-webe's Issues

Logging

Currently there is 0 logging in production. Need to evaluate existing logging crates out there, or consider rolling our own.

I imagine we create a shared LogManager and pass a reference into the existing AuthManager, FlashManager, etc.

Conveniently handle session in responders

I imagine a "LoggedInResponder" or "SecureResponder" or something that can be used to wrap other responders.

For example, the validation of the LoggedInResponder should check for the existence of the token and make it can be used to fetch a valid, non-expired Session object.

It should map Session errors to HTTP errors.

Automated tests for http endpoints

Currently the managers and database operations have tests, but the http endpoints do not. Use custom js/coffeescript tests? Or find a full-fledged endpoint test suite?

Create AuthManager trait. Simplify API

Instead of WebeAuth defining all the CRUD functions, the CRUD definitions should instead be split into an AuthManager trait that the WebeAuth struct implements.

The existing API was mostly to handle database operations. I think it's ok for them to still exist in their own renamed module, but any non-db operation contained needs to be moved into WebeAuth's impl of AuthManager (creating Account/Session models).

In addition, database operations should be their own trait and impl on the diesel connection.

Finish mechanism for importing mime types

The File Responder should include a big list of common mime types by default.

However, I think the we should be able to pass in a Vec<(&str,&str)> or... [(&str,&str); 20] to replace the default with a list. If we assume the provided list is smaller than the default, it will perform better. (Imagine a folder of thumbnails where we KNOW the only file type present is .png)

Need to compare Vec vs array performance. What about crates like StackVec?

Use WebeID instead of UUID

After a lot of research of popular Unique ID strategies out there, I created WebeID for my own projects. Now we need everything in the Auth project to make use of it.

Rework Response Result

should be able to return something like Ok(200) to return basic responses. Otherwise Ok(custom_response) should still work.

For errors we should be able to do the same. Err(400) for basic responses, otherwise Err(custom_err_response).

Drop "User" concept.

When I first started I had something like Netflix in mind where a single account could contain multiple users. But my current list of project ideas don't seem to have any use for it. For now, let's assume that only one person/"user" has access to an account.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.