moneo
- Node.js v14
- npm v7 (to check:
npm -v
, to upgrade:npm i -g npm
) - PostgreSQL v13
- Python v3.9
$ npm ci
$ pip install -r requirements.txt
$ cp .env.example .env
- Fill .env accordingly (database example:
postgresql://username:password@localhost:5432/moneo
) $ npm run seed
-
$ npm run dev
-
To apply or create a new migration, run the following command:
$ npm run migrate
$ npm test
Docker handles the deployment of Moneo. An example docker-compose config can be found below:
services:
web:
build: .
ports:
- 3000:3000
environment:
DATABASE_URL:
SECRET:
PUBLIC_URL:
SMTP_HOST:
SMTP_USERNAME:
SMTP_PASSWORD:
PRIVATE_KEY_ID:
PRIVATE_KEY:
CLIENT_EMAIL:
CLIENT_ID:
CLIENT_x509_CERT_URL:
ML_ID:
volumes:
- moneo_uploads:/app/public/uploads
- moneo_work:/app/work
depends_on:
- db
db:
image: postgres:13-alpine
ports:
- 5432:5432
environment:
POSTGRES_USER:
POSTGRES_PASSWORD:
volumes:
- moneo_data:/var/lib/postgresql/data
volumes:
moneo_data:
moneo_uploads:
moneo_work:
To access the API documentation, start the application and navigate to the following page:
http://localhost:3000/api
The documentation can be found on the right side of the website, behind the DOCS
tab.
.
├── migrations # Autogenerated migrations
├── public # Static assets served at /
├── scripts # Contains scripts in other languages than JavaScript
├── server # Back-end GraphQL server
│ ├── features # Queries and mutations split up into directories
│ ├── guards # Field guards
│ ├── models # All other GraphQL models
│ └── utils # Reusable utilities
├── shared # Utilities shared between client and server
│ └── structs # Shared validation models
│ └── types # Custom struct types
├── src # Front-end React code
│ ├── apollo # Autogenerated GraphQL types
│ ├── assets # Image assets
│ ├── components # Reusable React components
│ ├── hooks # Custom React hooks
│ ├── pages # NextJS public pages
│ ├── states # Global Dakpan states
│ └── utils # Reusable utilities
├── work # Images for model training
├ requirements.txt # Dependencies for Python usage
├ schema.graphql # Auto-generated GraphQL schema
└ schema.prisma # Database schema