Coder Social home page Coder Social logo

bsodium / api.bsodium.fr Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 488 KB

A next.js API for caching images and CORS-protected content for my eportfolio

Home Page: https://api.bsodium.fr

License: Apache License 2.0

JavaScript 6.31% CSS 2.86% TypeScript 90.83%

api.bsodium.fr's Introduction

api.bsodium.fr

This repository contains the source code of the API for my eportfolio/landing page, hosted at bsodium.fr on Vercel.

Usage

Install all required dependencies with the following command:

yarn install

To start the development server, run the following command:

yarn dev

The server should be available at http://localhost:3001 by default.

Technical challenges

This API mainly serves as a proxy to the many services which my projects are hosted on. This comes with some drawbacks such as rate limiting, especially when it comes to the GitHub and ResearchGate services. To mitigate this, a rudimentary but nonetheless highly effective and resource-efficient caching system has been implemented.

The parsed API responses are regularly "frozen" and stored in a JSON file (one per route), allowing for near-instantaneous responses to be served to the client, when fetching the same data from the original service would take several seconds.

The cache invalidation and refresh system is handled by a simple cron job, which runs every 24 hours.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

api.bsodium.fr's People

Contributors

bsodium avatar github-actions[bot] avatar

Watchers

 avatar  avatar

api.bsodium.fr's Issues

Unhandled merge conflicts upon pulling in freeze CI

The current implementation only pulls before pushing which may in some rare cases result in merge conflicts.

Since this is a CI environment and no one will be able to handle them manually, it is important that the branch be reset hardly to the main remote head before executing the freeze command.

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.