Git Product home page Git Product logo

trustauthx_ts_sdk's People

Contributors

bajajcodes avatar imvikashdev avatar moonlightnexus avatar neon-20 avatar sahilsuman933 avatar spiritanand avatar

Stargazers

 avatar  avatar

Watchers

 avatar

trustauthx_ts_sdk's Issues

Implement EdgeDB and Role Management Functionality in Client-side TypeScript SDK

Client-side GitHub Issue

Description:

We need to implement the EdgeDB and role management functionality in the client-side TypeScript SDK, similar to the Python SDK implementation. This includes the following features:

  1. Role Management: Implement methods for retrieving all roles, adding/deleting roles, and adding/deleting permissions for roles. These methods should make API calls to the server-side SDK and handle the responses accordingly.

  2. Response Classes: Implement separate response classes for each method in the role management functionality, such as GetAllRolesResponse, AddRoleResponse, DeleteRoleResponse, AddPermissionResponse, and DeletePermissionResponse. These classes should match the response formats expected from the corresponding methods.

  3. Documentation: Update the client-side TypeScript SDK documentation to include detailed information about the new classes, methods, and usage examples.

Implementation Steps:

  1. Create a new branch for this feature implementation.
  2. Implement methods for retrieving all roles, adding/deleting roles, and adding/deleting permissions for roles. These methods should make API calls to the server-side SDK and handle the responses accordingly.
  3. Create separate response classes for each method in the role management functionality, following the expected response formats.
  4. Update the client-side TypeScript SDK documentation with detailed information about the new classes, methods, and usage examples.
  5. Test the implementation thoroughly, ensuring it works as expected.
  6. Create a pull request for review and merge the changes into the main branch once approved.

Recommendations:

For the client-side TypeScript SDK, I recommend using IndexedDB or localStorage as the database solution for storing roles and permissions locally. Both options are well-supported in modern web browsers and can be used to store data on the client-side.

IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs, and provides features like indexes and transactions for efficient data access and management. However, it has a steeper learning curve compared to localStorage.

[Documentation] TrustAuthx Project Usage Guide

We’re missing a README for our project. It’s super important because it helps users understand what we’re all about and how to use our project.

Could someone help us out and write one? For an idea of what we’re looking for, check out this repo: TrustAuthx-Py-SDK

Refactor TS SDK Codebase

The SDK code (index.ts) is currently mixed together in a single TypeScript file. As our project grows larger, it will become more complex and difficult to contribute to.

To address this, we propose refactoring the index.ts file into separate folders. For TypeScript types, we can create a dedicated folder and place the types there. Similarly, we can create a separate utils folder to contain all the files related to utilities, including the utils.ts file.

Setup Server Side Sdk in Typescript for next-13 and subsequently client side sdk for react.

Setup Server Side Sdk in Typescript for next-13 and subsequently client side sdk for react.
Brownie points for vanilla js sdk.

Functions are already exposed here (server side ) : https://github.com/One-Click-Auth/Trustauthx_TS_SDK/blob/main/src/index.ts
Client side: https://github.com/One-Click-Auth/Trustauthx_TS_SDK/blob/main/src/client.ts

We are facing few issues regarding storing the tokens in cookies.
This is a paid gig.
Contact the team here for more info: https://discord.gg/qrB4Dzes

Implement EdgeDB and Role Management Functionality in Server-side TypeScript SDK

Server-side SDK UPDATE

Description:

We need to implement the EdgeDB and role management functionality in the server-side TypeScript SDK, similar to the Python SDK ( https://github.com/One-Click-Auth/TrustAuthx-Py-SDK ) implementation. This includes the following features:

  1. EdgeDB Role Query: Implement the _EdgeDBRoleQuery class to query and manage roles and permissions. This class should support in-memory and database storage modes, with methods for querying roles, validating permissions, and counting roles.

  2. Role Management: Implement the _Roles class, which inherits from _EdgeDBRoleQuery. This class should provide methods for retrieving all roles, adding/deleting roles, and adding/deleting permissions for roles.

  3. Response Classes: Implement separate response classes for each method in the _Roles class, such as GetAllRolesResponse, AddRoleResponse, DeleteRoleResponse, AddPermissionResponse, and DeletePermissionResponse. These classes should match the response formats expected from the corresponding methods.

  4. Database Storage: Provide the option to store roles and permissions in a database. Recommend a suitable database solution for the server-side TypeScript SDK to use for this purpose. Some potential options include PostgreSQL, MySQL, or MongoDB.

  5. Documentation: Update the server-side TypeScript SDK documentation to include detailed information about the new classes, methods, and usage examples.

Implementation Steps:

  1. Create a new branch for this feature implementation.
  2. Implement the _EdgeDBRoleQuery class with the appropriate methods for querying and managing roles and permissions.
  3. Implement the _Roles class and its methods for role and permission management.
  4. Create separate response classes for each method in the _Roles class, following the expected response formats.
  5. Integrate a database solution (e.g., PostgreSQL, MySQL, or MongoDB) for storing roles and permissions, and provide the option to use either in-memory or database storage.
  6. Update the server-side TypeScript SDK documentation with detailed information about the new classes, methods, and usage examples.
  7. Test the implementation thoroughly, ensuring it works as expected.
  8. Create a pull request for review and merge the changes into the main branch once approved.

Recommendations:

For the server-side TypeScript SDK,

There's AI suggestion for SQLLITE

In TypeScript, you have several options to work with SQLite:

  1. sqlite3 with TypeScript: You can use the sqlite3 package along with its TypeScript definitions. You can install them using npm:

    npm install sqlite3
    npm install --save-dev @types/sqlite3

    This will allow you to use SQLite in your TypeScript project².

  2. sqlite: This is a wrapper library written in TypeScript that adds ES6 promises and SQL-based migrations API to sqlite3¹. You can install it using npm:

    npm install sqlite3 --save
    npm install sqlite --save

    This library has the same API as the original sqlite3 library, except that all its API methods return ES6 Promises¹.

  3. Prisma: If you're looking for an Object-Relational Mapping (ORM) solution, Prisma is a good option. It supports SQLite and has strong TypeScript integration³.

  4. better-sqlite3: This is another SQLite library that you can use in TypeScript⁴. It's designed to be simpler and faster than sqlite3.

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.