Coder Social home page Coder Social logo

kushtrimh / zana Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 457 KB

Browser extension that adds book information and ratings to supported bookstore websites.

License: Apache License 2.0

Rust 46.07% Java 23.16% JavaScript 19.35% CSS 1.03% HTML 10.14% Shell 0.24%
browser-extension extension rust

zana's People

Contributors

kushtrimh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zana's Issues

Add cache support to the CICD pipeline for faster builds and deploys

Is your feature request related to a problem? Please describe.
CICD pipeline takes too long when a new build or deployment is being executed.
Rust crates in services take most of the time, 2 minutes on average for build or tests run.

Describe the solution you'd like
Caching can be setup for the CICD pipeline, so the same dependencies are not download multiple times.
More information about caching for GitHub actions: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
A good examples from Cargo Lambda shows caching setup for Rust crates on GitHub Actions: https://www.cargo-lambda.info/guide/automating-deployments.html#step-3-creating-the-release-workflow

Describe alternatives you've considered
No other alternatives considered. This is supported by GitHub Actions, and would be one of the better solutions.

Additional context
Examples from some of the latest build and deployment runs.
image
image

Service to fetch data from Google Books API

Create a service that will fetch data from Google Books API.
Service should be written in Rust, and written as a library so it can be used later by other services which will be more focused on the environment that they will be used or deployed in.

The library should accept an API Key and the Google Books API URL.
When provided an ISBN, Google Books API should be queried for the selected book and return the data.
If the book cannot be found with ISBN, it should be search using the book name and author name, and if multiple books are returned in this case, the first one should be picked.

If an error occurs, an Error entity should be returned that has detailed information.

  • HTTP Response status code if the error is HTTP related
  • Description about the reason why the error happened

Provision resources and deploy zana in AWS

Zana willl be deployed in AWS, and the resource provisioning and deployment should be handled using AWS CDK.
Java will be used to provision the resources using AWS CDK.

More info to be added soon...

Add support for OpenLibrary

Add OpenLibrary support https://openlibrary.org/developers/api.

In this issue, a refactor should be made so that Google Books and OpenLibrary calls will return the same struct once called.
2 requests should be made for OpenLibrary.

  1. Search by ISBN
  2. Once step 1 returns, get the ratings on a seperate API call

AWS Lambda that uses zana Rust library to fetch data from Google Books API

Add a new project in services called zana-lambda.

This project will be a AWS Lambda written in Rust, which will use zana library to fetch data from Google Books API.
The responses from this Lambda should be in JSON, and it should accept Google Books API client id and secret and Google Books API URL as environment variables.

In cases where data of a book could be fetched from Google Books API, the response should be as follows

Status: 200

{
    "data": {
        "page_count": 200,
        "average_rating": 4.2,
        "ratings_count": 143,
        "description": "Some description about the book"
    }
}

In cases where an error occurs, and data cannot be fetched, the response should be as follows

Status: 429

{
    "error": "limit_reached",
    "details": "Cannot retrieve data from external services due to API request limits"
}

The error details and types are only placeholders.

2 environment variables should be provided to the created Lambda.

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.