Before starting, ensure the required technologies are installed.
- Node.JS >= v22
- NPM >= v10
- MySQL >= 8.0
In the examples of all commands in the text <env>
is the name of the environment to perform the migration, e.g. dev
or prod
.
- Clone this repository and move to the project directory:
git clone <repository-url>
- Install all dependencies:
npm install
- For development purposes use
dev
environment. Configure the database connection by copying the.env.development.example
to a new file.env.development
. After that put your MySQL credentials of root user:Also, new DB user# Database Root Configuration DB_ROOT_HOST=localhost DB_ROOT_PORT=3306 DB_ROOT_USER=root DB_ROOT_PASSWORD=root
flowy_sql
will be created after executing the next command. Credentials offlowy_sql
user can be changed:For test purposes use# Database App Configuration DB_APP_HOST=localhost DB_APP_PORT=3306 DB_APP_USER=flowy_sql DB_APP_PASSWORD=securepass DB_APP_DATABASE=flowy
test
environment: create.env.test
file by copying the.env.test.example
file. - Run script for create databases and user:
npm run setup:db
- Run command to apply necessary migrations.
npm run migrate
- Run command to create prisma client:
npm run migrate:generate
- Run command to build the project:
npm run build
- Seeds help you fill your database with initial data for a presentation or project launch. To start creating test data, run the command:
npm run migrate:seed
- Start the server:
npm run start:dev
- Application will be launched on http://localhost:8080/.
To use the predefined settings for Postman, import the file flowy.postman_collection.json.
Environment variables are taken from .env.development
file. You can start containers with the command:
docker-compose --env-file .env.development up -d
To view a list of containers:
docker ps -a
To stop running containers:
docker-compose stop
To stop and delete containers, networks, and associated resources (with volumes):
docker-compose down -v
Ethereal is a fake SMTP service, mostly aimed at Nodemailer and EmailEngine users (but not
limited to). It's a completely free anti-transactional email service where messages never get delivered.
To view the letter that the user will receive, you need to log in to this service using a test login and password.
Default credentials you can find in .env.development.example
file or:
- login:
corrine.strosin80@ethereal.email
- password:
EEshmbDQ6mKBzprKVK
The documentation of all available endpoints can be found http://localhost:8080/api. The Swagger library is used.
- To create new migration run command:
npm run migrate:create --name <migration_name>
- To refresh all data at the database run command:
npm run migrate:refresh
To fill the database with demo data of users, companies, events and tickets, run the following command:
npm run migarte:seed
Here is the fake data for presentations.
User data for testing:
- full name:
Test User
- email:
test.user@flowy.com
All users have a password:
Password123!$