
Free and Open Source
Full Stack
RAPID API DEVELOPMENT
Colmena is a starter kit for an API with an Admin interface that can be easily extended and built upon.
It is built using a collection of great Open Source projects, including but not limited to:
Colmena is a work in progress and not all functionality is built yet.
The project is a mono-repo managed by lerna. It is structured like this:
apps/
admin The Admin interface built with Angular.api The REST API built with LoopBack.modules/
admin-* Modules that add functionality to the Admin app.api-* Modules that add functionality to the API app.packages/
admin-* Packages used by the Admin app.api-* Packages used by the API app.The structure of this project is inspired by this great example: OasisDigital/scalable-enterprise-angular.
node (v6.9.x or higher).npm (v3.x or higher).npm install -g @angular/cli lerna loopback-cliClone the repository and install the dependencies:
git clone https://github.com/colmena/colmena
cd colmena
npm install
lerna bootstrapWhen the project is running in development mode the API and the Admin will restart automatically when a code change is detected.
From inside the project dir run npm run dev:
npm run devThis will start both the API and the Admin in the same terminal.
You can also start the two components separately:
npm run dev:apinpm run dev:adminDuring development it can be useful to bring the project back to a clean state. To do this run:
npm run clean && npm install && lerna bootstrapYou can configure the API in development mode by creating a local.yaml file in config. The contents of this
file is not tracked by git so it only lives on your local machine.
To start with the default settings copy config/default.yaml to config/local.yaml.
The API comes with a set of sample data for development.
To load the sample data when starting the API update local.yaml to include:
system:
initdb: trueYou can also use the INITDB environment variable.
By default the development stack assumes that the API and Admin are both started on localhost (using 127.0.0.1).
In order to run the API on another host than localhost the admin needs to know on which IP address it can reach the API.
To do this you need to update the api.baseUrl config property.
Make sure to configure the API Base Url without a trailing slash.
To set the API Base Url update local.yaml to include:
api:
# Do not use trailing spaces for the baseUrl
baseUrl: http://192.168.12.34:3000You can also use the API_BASE_URL environment variable.
You should now be able to connect to the Admin on http://192.168.12.34:9000 and it should connect to the API.
Colmena comes with a Docker Compose configuration for running development servers easily.
To use the mongodb server update local.yaml to include:
mongodb:
url: mongodb://localhost/colmenaYou can also use the MONGODB_URL environment variable
To use the mailhog server update local.yaml to include:
smtp:
host: localhost
port: 1025You can also use the SMTP_HOST and SMTP_PORT environment variables
npm run servers # or: npm run servers:startnpm run servers:logsnpm run servers:stopnpm run servers:rmThanks goes to these wonderful people (emoji key):
Bram Borggreve ? ? ? |
Willian Ribeiro Angelo |
Nick Portokallidis |
drmikecrowe |
Vladimir Mechkauskas |
Bernardo Arevalo |
yieme |
|---|---|---|---|---|---|---|
Brian McIntyre |
Rob Halff |
Asgeir Birkisson |
dthib |
Oleh Kukil |
Pulkit Singhal |
Tuan PM |
brownman |
Hoàng Phúc |
Brian Dunnette |
Chenzc |
Tersius Kuhne |
Alex Quiambao |
José Luis Di Biase |
Shing. |
Alex Wilde |
dmtw |
Marcus |
Brannon N. Darby II |
Sebastian Podgajny |
IsCaster |
This project follows the all-contributors specification. Contributions of any kind welcome!
Support us with a monthly donation and help us continue our activities. [Become a backer]
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
This project was formerly known as Loopback Angular Admin.