Git Product home page Git Product logo

fundi's Introduction

Fundi - A REST API backend based on Fastify

Fundi is an application scaffold for REST API backend based on Fastify.

NB: This project should be considered WIP and it doesn't aim to reflect the best way Fastify should be used, but it's rather an experiment to help driving into Fastify best practices.

Why Fundi name?

Fundi comes from Swahili and means technician, artisan, craftsman.

Fundi is intended to be a scaffold to build business web application using Fasify.

Why Fastify?

Because Fastify is an interesting and fast-growing framework to build server-side web applications focused on performance.

Even if this project is not indeed to be "fast", the Fastify framework is chosen for its service/plugin/middleware architecture approach, which could be a key feature to build flexible and extensible software in a business application context.

There are plenty of "batteries-included" "opinionated" frameworks that can solve this problem, most of them are based on Express.js, this would be a scaffold built from scratch using Fastify.

Contribute

This project is a prototype open to everyone who wants to contribute to defining what could be the best approach for a better developer experience. Feel free to open a pull request or open an issue.

How to run this project in 4 steps

  1. Clone repository and run npm install
$ git clone [email protected]:etino/fundi.git
$ cd fundi
$ npm install
  1. Copy .env.template in .env and set your environment variables

  2. Database initialization (default engine sqlite3 in /data folder - need to be created)

$ mkdir data
$ npm run db:migrate:latest
$ npm run db:seed:run // load data with defaults
  1. Run the server and open http://localhost:3000/documentation
$ npm run start 

Service architecture

Implemented services are located in service directory. Actually only users service is implemented.

Every service has the following architecture

  • index.js for routes and handler functions
  • service.js for business logic
  • models directory for ORM (Objection.js) models.

TODO

  • define a standard (automatic) CRUD implementation
  • evaluate ORM alternatives (for example Prisma.io)
  • convert to Typescript(?)
  • implement a test strategy

References

Plugins and Libraries used

Project References

Fundi is build starting from this examples projects

fundi's People

Contributors

etino avatar

Stargazers

Hafidh Pradipta A. avatar David Adam Coffey avatar Shahadat Hossain avatar Jonelle Amio avatar ナラパレディ ウペンドラ avatar Teerapat Prommarak avatar Povilas Brilius avatar  avatar silvesterwali avatar  avatar Aryan Vikash avatar Aditya Pranav avatar Zidna Fadla avatar Willard Mazarire (Darth Coder 28) avatar Shadrack Lilan avatar Mitchell Gritts avatar  avatar

Watchers

Leandro Souza avatar James Cloos avatar  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.