MCPcopy Index your code
hub / github.com/LeChatErrant/API-template

github.com/LeChatErrant/API-template @1.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.3 ↗ · + Follow
63 symbols 185 edges 36 files 3 documented · 5% updated 18mo ago1.1.3 · 2021-12-23★ 521 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

API-template

Lint Unit tests Integration tests

What is it ?

The purpose of this template is to provide a typesafe, production ready web API, and a full development environment with the best tooling possible

It gives your project a clean base to start and follows development good practices, essentially focusing on maintenability and extensibility

Lastly, it aims to save developers a lot of time since all nasty configurations are already written (typescript, eslint, jest, docker, CI, ...) and technologies are already chosen (language, testing framework, database, ORM, ...)

 

API-template is fully integrated with - front-template, a modern typescript frontend stack - ops-template, a complete scalable infrastructure on Kubernetes

Don't hesitate to share your improvements or to give feedback on Discord (LeChatErrant#6074) :wink:

 

Template
This repository is templated. Use it as a base for your own projects by clicking on Use this template

Table of contents

Documentation

Documentation can be found in the wiki

Deployment

API is deployed on Heroku and can be reached on api-template-prod.herokuapp.com

Additionally, a public Postman workspace is available on www.postman.com/LeChatErrant/workspace/api-template to let you try the API

For a complete production deployment, see ops-template

Getting started

  1. Make sure the .envrc is loaded (have a look here)
  2. Install dependencies with npm install
  3. Launch a local database with npm run dev:db
  4. Run npm run dev

Deployment example

Technologies

...and more

CLI

The template comes with a Command-Line Interface that helps you to initialize, develop and maintain your projects. It saves you from writing boilerplate code

The CLI is currently under heavy development, new features will be release soon ❤️

More details in wiki

CLI - Generate

Work in progress

  • [ ] CLI to create, extend and manage API resources
  • [ ] Auto generated code documentation
  • [ ] Integration with Prisma seeders
  • [ ] Back office template

How to contribute

  1. Fork it (https://github.com/LeChatErrant/API-template/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Issues and comments welcomed ! :wink:

Contributors

GitHub Logo   LeChatErrant - creator and maintainer

Extension points exported contracts — how you extend this code

UserSession (Interface)
(no doc)
src/appSession.ts
Ro (Interface)
(no doc)
src/appRo.ts
UserRo (Interface)
(no doc)
src/routes/user/userTypes.ts
SessionData (Interface)
(no doc)
src/appSession.ts
PostRo (Interface)
(no doc)
src/routes/post/postTypes.ts

Core symbols most depended-on inside this repo

signin
called by 43
src/appRequester.ts
signup
called by 41
src/appRequester.ts
createPost
called by 28
src/appRequester.ts
updateUser
called by 16
src/appRequester.ts
getUser
called by 11
src/appRequester.ts
env
called by 10
src/appConfig.ts
listPosts
called by 9
src/appRequester.ts
getPost
called by 9
src/appRequester.ts

Shape

Function 31
Method 14
Class 12
Interface 5
Enum 1

Languages

TypeScript100%

Modules by API surface

src/appRequester.ts16 symbols
src/routes/user/userTypes.ts7 symbols
src/routes/user/userControllers.ts6 symbols
src/routes/post/postTypes.ts5 symbols
src/routes/post/postControllers.ts5 symbols
src/utils/hash.ts2 symbols
src/appSession.ts2 symbols
src/appRo.ts2 symbols
src/appConfig.ts2 symbols
src/utils/waitApp.ts1 symbols
src/utils/seedAdminUser.ts1 symbols
src/utils/closeApp.ts1 symbols

For agents

$ claude mcp add API-template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact