Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 25, 2019 12:06 pm GMT

Base - API for authentication, email sending, image upload and more!

I work in an agency (Digital Natives) which creates products (large and small) for clients. We are there from the design and validation phase up until the MVP development, which I'm part of as both frontend and backend developer.

I realized that these projects have a lot in common so I created Base (API as a Service) to help me with them:

  • handling user registration / authentication
  • sending emails
  • uploading files to a cloud provider for downloading later
  • uploading images to a cloud provider, with cropping and resizing capabilities

In my ~7 years of professional experience I build these things over and over again for many products using a library / service or just coding by hand.

In the last project I worked on I used different services for each and the end result is a spagetti of calling different APIs with different keys and some interesting hacks to keep them working correctly , not to mention the hustle of getting production keys from the client and managing all of those admin interfaces.

At this point I thought : there must be something easier, more compact to use but there isn't, especially if you want to remain language agonistic.

So Base was born and with it you can do all the things mentioned above using a single API key, and it has a nice, clean UI where you can see all of your resources per project:

Screenshot

Keep in mind this is just an MVP, there are a few features I'm planning to add in the next couple of weeks:

  • client libraries for some languages (Ruby, NodeJS, Go and Crystal at first)
  • single newsletter signup and querying the recipients
  • batch email sending
  • scheduling calls to your server (think cron jobs)
  • using your own credentials for storage and email sending

I hope it will be useful for your next project :)

Let me know what you think!

Since this is DEV Community here are some facts about the code:

  • the backend is build with Crystal, it's currently a 2.4 MB single binary that runs on Heroku using 13 dependencies (shards)
  • the frontend is build with Mint, it's hosted on Netlify, it's both desktop and mobile friendly and it has no dependencies other than the standard library
  • the frontend is a PWA so the API reference is working offline
  • the backend is ~2200 LOC and the frontend is ~8600 LOC
  • the database is PostgreSQL
  • it took me around a month to build it off work

If you have any questions I would be happy to answer them.

Credit: Header illustration from fullvector


Original Link: https://dev.to/gdotdesign/base-api-for-authentication-email-sending-image-upload-and-more-4f1

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To