Skip to content
/ abase Public

🏠 A (solid) Base for your Web Application.

Notifications You must be signed in to change notification settings

dwyl/abase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • A Secure way of storing people's personal data.
  • Plain English Access controls
  • Mobile First/Optimised (Responsive) UI (view/edit data on any device)
  • Server-side Rendered (for speed) with client-side (progressive) enhancement (for user experience)

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

  • Simple UI/UX for people to
    • register
    • login
    • verify (their email)
    • re-set password
    • view/update any other personal details once logged in
  • REST API Endpoint for all actions (when content-type is not set to text/html)
  • HTML Responses for all endpoints that request content-type



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.

About

🏠 A (solid) Base for your Web Application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published