Giter VIP home page Giter VIP logo

api's Introduction

Winget.run API

The REST API behind winget.run, allowing users to search, discover, and install winget packages effortlessly without any third-party programs. Package manifests are periodically fetched from the GitHub API to prevent hitting ratelimits.

If you wish to use our API, please take a look at our docs. All other non-documentation info will be provided in this readme.

Contents

Installation

A Docker image is built for the project in our CI/CD pipeline on the develop, release/* and master branches. These can be found here. A detailed example of building and running the project without docker can be found in the development section.

NOTE: We currently only support x509 MongoDB autnetication with TLS, we may modify this at a later date.

The following environment variabled are required to run the container:

  • MONGO_HOST: MongoDB host.
  • MONGO_DB: MongoDB database name.
  • MONGO_CERT: MongoDB x509 cert.
  • MONGO_CA: MongoDB CA cert.
  • WEB_ADDRESS: Host address for CORS.
  • WEBSERVER_LOGGER: Enable logger (boolean).
  • WEBSERVER_PORT: Port to run the API on.
  • WEBSERVER_ADDRESS: Address to run the server on (eg. 0.0.0.0).
  • GITHUB_TOKEN: GitHub API token.
  • CRON_FREQUENCY: Cron notation for UPDATE_FREQUENCY_MINUTES (below).
  • UPDATE_FREQUENCY_MINUTES: How often new packages are fetched from GitHub in minutes.
  • API_ACCESS_TOKEN: Token that will be required for accessing protected routes.

NOTE: The cron job is not included in this app and needs to be set up seperately.

Development

Local development requires the following software:

  • NodeJS
  • Yarn
  • MongoDB

The environment variables mentioned in the installation section can be placed in a .env file in the project's root.

If everything is set up correctly, run the following command for an optimal development environment, which will watch for changes in the typescript files and auto-restart the server if necessary.

  • yarn build:watch
  • yarn run:hot

Tests and linting can be run using the following commands:

  • yarn test
  • yarn lint

For any additional commands, check out the package.json.

NOTE: The MongoDB ORM that were using, typeorm, currently doesn't support TLS, making it work unfortunately required a monkey patch in /src/database/index.ts.

Deployment

We use GitHub Actions CI/CD and Kubernetes for our deployments. All required into regarding deployments can be found in /.github and /chart.

Contributing

Issues and pull requests are welcome. We currently don't have any templates (at the time of writing) so a pr for those would be nice as well. If you wish to check the progress of current tickets, we have boards set up using ZenHub.

We currently don't have tests, but will add them soon™.

Authors

  • Lukasz Niezabitowski (Dragon1320)
  • Ryan Larkin (rlarkin212)
  • Matthew Watt (MattheousDT)

Acknowledgments

  • My beloved coffee machine for making glorious coffee in the morning (and night) and keeping me awake during these 12 hour programming sessions as we rushed to get this released.
  • Certain things mentioned in our docs' introduction section and certain other things that I was not allowed to leave in but kept in source control anyway to amuse anyone who comes across it.

License

Ask us if you want to use the code, or suggest a license and make a pr.

api's People

Contributors

dragon1320 avatar rlarkin212 avatar mattheousdt avatar dependabot[bot] avatar

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.