This repository contains the backend code for the Memora project, our blockchain-powered platform to help you manage and preserve your online presence for future generations.
The backend is built around four main services:
- AI Service
- Warpcast Service
- Chain Service
- Database Service
It provides endpoints for authentication and fine-tuning, as well as a core cron process for monitoring user activity and interact with the Rootstock blockchain.
- Install dependencies:
npm install
The project uses Sequelize CLI for database migrations. Here are the common commands:
To create a new migration file:
npx sequelize-cli migration:generate --name migration-name
To run all pending migrations:
npx sequelize-cli db:migrate
To undo the most recent migration:
npx sequelize-cli db:migrate:undo
To undo all migrations:
npx sequelize-cli db:migrate:undo:all
When you make changes to your models, generate a new migration:
npx sequelize-cli migration:generate --name update-model-name
Then edit the generated migration file in the migrations
folder to specify the changes.
To run migrations for a specific environment:
npx sequelize-cli db:migrate --env production
To check the status of migrations:
npx sequelize-cli db:migrate:status