$ npx @apparts/bootstrap-api
Kickstart your API
Bootstrap your API with one command! Select the components, you want to use and get going.
The project layout and the needed dependencies are installed for you. You decide what to include:
- An adapter to your Postgresql database (@apparts/db)
- An abstract model for your data (@apparts/model)
- Automatic route generation for your models (@apparts/model-api)
- Authentication and user management (@apparts/login-server)
Enriching your API
@appart API components
-
@appart/types
Makes sure, that your API is correctly typed. On all requests, the parameters are parsed and checked for you. Falsely formatted requests are rejected.
@apparts/types is build with documentation and testing in mind. Generating API-docs is trivial, checking what your API returns is too.
-
@appart/db
An adapter to your database. It is designed with Postgresql in mind, but if needed, you could write an adapter to basically any database system.
@apparts/db reduces coupling to a specific database system while enabling more abstract modules to use the database.
-
@appart/model
Abstracts away the most common operations on your data. You can model any data entity, store and retrieve it from a database. Data integrity is checked by default.
@apparts/model makes handling data easy and painless. It also serves as the global way of handling data in the whole apparts framework.
-
@appart/model-api
Creates CRUD routes for your data model. It takes the type of your data into account and generates the appropriate REST endpoints.
@appart/model-api is like cheating: Define the models, tell model-api which routes to generate, and whom to allow access. Done.
-
@appart/login-server
Authenticates, manages and authorizes users. User management the easy way, all API endpoints are predefined. Your API can be secured, simply by checking a JWT, which can easily be done with @apparts/types.
@apparts/login-server secures your application enables easy role and user management.
-
@appart/backend-tests
Sets up your Jest-environtment. Easily check that all your API endpoints return the expected types and values, interact well with the database and find bugs without the hassle of setting the test environment up.
@apparts/test-backend takes the boilerplate off your shoulders and gives you sensible default values.
- phuhl/apparts-config
- phuhl/apparts-geolocation
- phuhl/apparts-townsearch
- phuhl/apparts-tracker-api
- phuhl/apparts-error