Giter VIP home page Giter VIP logo

avored / avored-rust-cms Goto Github PK

View Code? Open in Web Editor NEW
55.0 6.0 13.0 2.06 MB

Avored rust content management system

Home Page: https://avored.github.io/avored-rust-cms/

License: GNU General Public License v3.0

CSS 11.36% Rust 43.66% Dockerfile 0.22% Shell 0.19% HTML 0.41% JavaScript 44.16%
api cms cms-backend cms-framework content-management content-management-system rust rust-cms rust-lang axum

avored-rust-cms's People

Contributors

altaf434 avatar cutestnekoaqua avatar indpurvesh avatar rohan-bhautoo avatar subhajit20 avatar syazell1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

avored-rust-cms's Issues

Permission check

We need to check the user permission on all the admin or protected routes with role/permission check for the given user.

  • allow user to have multiple roles
  • do a query on logged in user to check the permission.

Display success message

Display success message after

  • Create Admin User
  • Edit Admin User
  • Delete Admin User
  • Create Role
  • Edit Role
  • Delete Role

Avored cms install / setup page

We need to come up with an idea how to setup app for as part of first install.

  • It should carried out creating an super admin user record
  • it should add all tables (migration) to surreal db
  • any other one time task that needs to be there as part of initial app setup.

Role Delete page

Need to edit a role delete a feature

  • Backend RUST API needs to build
  • VUE UI with role form needs to make.

Role List Page

needs to build role list page

  • create a roles table
  • create roles list RUST API
  • create a UI to display all roles in vue

Improvement for Model

we need to improve the model code improvement the way we convery from surreal object, values into struct. We need to think about how we can improve by using try_into or like similar.

Admin user create

Create a Admin Usercreate page

  • backend api need to build
  • frontend form needs to make

improve handlers folder structure

we need to improve the modularity for all the handler's rust files we have.

└── handlers/
    ├── admin-users/
│   ├── mod.rs
│   ├── admin_user_table.rs
│   └── create_admin_user.rs
└── role/
    ├── mod.rs
    └── role_table.rs`

Admin user delete

Delte an admin user

  • Backend API to delete an admin user
  • UI to delete an admin user and display a message.

Form validation code improvements

We need to improve the code base for all the request struct which got many repetitive code for validation requests.

Look at the store_role_handler where we move the validation logic into store_request sturct so we need to do similar for all the Request struct in the app.

  • Form validation without file
  • Form validation with file

Basic Asset table page

we just need a blank asset page as of we need to add a another api module in rust backend.

Tests needs to be added

Currently, there is no tests are added to the project. I would like some community help if someone can help to add tests to the projects.

Rust display form validation error message

Possible way of doing is:

Once we received the validation error list via validation crates method then add into a app_state and need to create a handlebars helpers which will read the vec and return to view.

We need a way to delete validation errors from app_state too if it is not used for whatever reason?

Asset create page

we need a asset create modal initial modal should only able to upload image into backend. Once this step is completed we will work on crop image feature for uploading image.

Role Create Page

Need to create a role create feature

  • Backend api needs to build
  • UI with role form needs to make.

Admin user edit

Create a Admin User edit page

  • backend API for update need to build
  • backend API for get admin_user model needs to build
  • frontend form needs to make

Date time format

we need to add a method to format the date time helper for handle bar

GraphQL Setup

we need to install very basic hello world graphql for avored cms

Role Edit Page

Need to edit a role create a feature

  • Backend RUST API needs to build
  • VUE UI with role form needs to make.

Rest api mod setup

we need to setup rest api mod for backend and eventually grow the api list.

fix the security scanning

There is a bunch of security tab fixed that can be done very easily with many minor changes in code.

Please create a new issue from UI then work and do a PR. Gitaction should trigger and see the result.

Vue admin user list page

Create a Admin User list page in vue

  • Needs to think about the data table?
  • need to build a rust backend api

Keep the Form Data into session

We need to come up with an idea to keep the form data into session so in the event of an error when we redirect back to original page it can use the data so user don't have to refill whole form.

Implement Default for modal

we need to implement default for most of the modal struct that we have. this will help to improve the code base.

pub struct AdminUser {
      pub id: String,
      pub full_name: String,
      pub email: String,
  }

  impl Default for AdminUser {
          fn default() -> Self {
                 AdminUser {
                      id: String::from(""),
                      full_name: String::from(""), 
                      email: String::from(""), 
                 }
          }
  }

Advantage of implementing the default is that in the repository we can do something like

   let admin_user: Result<AdminUser> = match result_admin_users {
        Ok(data) => data.try_into(),
        Err(_) => Ok(AdminUser::empty_admin_user()),
    };

    // the above three line code can be converted to one line and more clean approach.
    let admin_user = result_admin_users.unwrap_or_default();

Edit Role page

We need a way to edit role for the app in the admin

The idea is to follow the admin user update feature.

Asset table page bug

Fixed the bug:

  • Asset page will return 500 as there if it is a fresh install with no DB record in table.
  • Restrict the asset upload to image file only

middleware setup for rest api

We need to setup custom middleware for rest api end points.

Idea here is middleware should check two thing.

  • If admin user with cookie is setup then it allow to call the rest api.
  • If JWT token is setup in header Bearer token it should allow to go via rest api otherwise it block the api.

Component create/store routes

we need to start with the component create/store routes. As of start we need to support only text field for component create ui.

create role page

We need to add a page in avored admin to add a role to table with fields and backend processing.
Page should be able to display a validation error as well.

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.