Please note that this project is primarily focused on backend processes and might be a bit technical for those who aren't familiar with using APIs.
Unique identifiers, such as license keys and secure passwords, are a regular requirement for a diverse range of software projects. Yet juggling different approaches natively in a project's codebase can lead to inconsistencies and in turn bugs which consume valuable time and mental bandwidth.
This project provides an easy to use simplified API for consumption in a variety of projects. In other words, it outputs a variety of different codes for different use cases. Be they license keys, passwords, voucher codes, postal codes, et cetera, having a single source of truth for what constitutes a valid code eliminates the hassles of disparate code generation.
This project is effectively like a helpful assistant that generates custom codes for various computer tasks.
This project utilises Express on top of NodeJS to provide routing functionality to clients. It has a main file called 'server.js' that manages everything, becoming the central point for all routes. This file handles different requests, deciding what types of code to create based on the client's chosen configuration.
All the instructions for creating the different types of code are stored in a folder called 'data,' which in turn makes use of other functionality that has been abstracted away for ease of troubleshooting.
For user reference, the 'docs' folder contains documentation for each route, offering insights into their intended uses within the API.
A working demo of the code is currently installed here: https://code-generator-api.onrender.com/v1/codes/alphanumeric/500/16/4/2
Adjusting the parameters according to the documentation will yield the described results.
Please remember, this is not a frontend facing application. Visiting the url above will yield an output designed to be used in the backend of an existing application.
Please also bear in mind I'm using a free server which puts itself to sleep when not in use. In practice this means that any initial request to the server has a relatively slow response but subsequent requests are much faster. In a real world use case, this code would be hosted on a server that is always up.
You can also see the codebase itself here: https://github.com/p3z/code-generator-api
Other case studies
Website build
Current focus
Website build
Web and app development