dwyl / abase

:house: A (solid) Base for your Web Application.
9 stars 0 forks source link

Build Status codecov

abase ("a Base")

First Iteration Documentation

See the wiki: https://github.com/dwyl/abase/wiki/Documentation

A Base for building reliable web apps quickly.

Why?

Keeping people's (personal) data safe is essential in every web application that requires personalisation. Yet writing the code to help people manage their own data can be quite tedious and usually is not the "core competence" of most web apps.

We found that we had built/re-built the "user" registration/verification/login, "manage my profile/preferences" and permissions/roles "workflow" enough times that it was time to make something generic & re-useable.

You can pay a 3rd Party "Auth"-as-a-Service Provider and have them manage your ("user") data on a server you have no control over and pay them for each registration/login event ... for some companies this is a good option because they don't have to think about where the data is stored, however we prefer to know exactly where data is stored, how it's encrypted and who can access it.˜

What?

Distinguishing/Differntiating Features

Who?

Who Should Use This?

Anyone building a web app (where the experience is personalised) and wants to know where/how data is stored and thus ensure that customer data is not being miss-managed or sold (which we think [wrong]()).

How?

Requirements



tl;dr

Why Build a New Tool/Service?

There are many platforms for "User" (people) authentication and personal data storage/management, why build another one?

Simple: to incorporate the all the best ideas/practices we like and have an extensible (plugin-based) platform anyone can add to/build upon.

Why PostgreSQL?

While there is a lot of hype surrounding NoSQL Databases like MongoDB & Redis, we found we were having to write a lot of code to do useful queries. And while de-normalising data might "make sense" for "scalability" in theory, what we found in practice is that even with 100 Billion Records (way more users than 99.99% of companies/startups!) a well-managed PostgreSQL cluster copes very well.

Make up your own mind: https://www.postgresql.org/about
If you're still Curious or Worried about scaling PostgreSQL? see: https://www.citusdata.com Want to model the network of people as a graph? https://github.com/cayleygraph/cayley

Running the Project

For the tests to work you will need to have the url to a test database in a config.env file as followed:

TEST_DATABASE_URL=psql://localhost:5432/testdb

Note before tests are run the tables may be removed from the database so don't keep your family photos there.