Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This guide is to provide an onboarding to the codebase to new Litefarms contributors.

Backend

The projects backend is using Node along with Express to run the servers backend and routing logic. You will need to be pretty familiar with express routing before getting into any code.

To access the database and to query it we are using Knex, which is a QueryBuilder for multiple SQL engines, in our case we are using PostgreSql. Please go through Knex documentation and migration cli so you get a better understanding of both, the library and how the project goes about using it. Take a look at the api/db/migration folder, which contains all the projects migrations (so far) and how the DB has evolved from day one. You should get a pretty good understanding of how it works after that. You can also checkout an ERD diagram of how the DB looks right now.

To define our models we are using ObjectionJS as our ORM, you can see all our models in api/src/models.

Frontend

As you might know, we are using React as our primary frontend Library, if you haven't seen React before we strongly recommend you go through the React Documentation and the Tutorial they are both extremely helpful getting started sources (in fact, bookmark the documentation, you are probably revisiting it every other day).

To complete our "stack" we are using Redux for state management, if you haven't heard about redux before, we strongly recommend you to go through every piece of information on their page. if you are more of a visual learner, redux creator Dan Abramov has a free tutorial which goes through everything (again, bookmark the documentation).

  • No labels