evrimagaci / periodum-api

A database that compiles tons of information about elements and compounds.
https://periodum.com
Open Software License 3.0
19 stars 10 forks source link
chemistry compounds docker docker-compose element evrimagaci kimya nodejs prisma typescript

Periodum API

main workflow

Periodum project's backend.

Tech Stack

Development

Run localy

After you have required tech stack above, feel free to run it like this.

npm install && \
npx prisma generate && \
npm run dev

Run inside Docker

# Run the db in background
docker-compose --env-file ./dev.env up -d db

# Run the app in foreground
docker-compose --env-file ./dev.env up app --build

# Run the app in background
docker-compose --env-file ./dev.env up -d app --build

Some tips

Running migrations

Please always follow the latest Prisma documentation for migrations.

# It will reset the db,
# apply all migrations
# and run the seed
# Currently it will import only Elements and Isotopes
npx migrate reset

# For help you man checkout the manual
npx prisma migrate --help

Prisma Migration Commands

# Create a migration from changes in Prisma schema,
# apply it to the database,
# trigger generators (e.g. Prisma Client)
prisma migrate dev

# Reset your database and apply all migrations
prisma migrate reset

# Apply pending migrations to the database in production/staging
prisma migrate deploy

# Check the status of migrations in the production/staging database
prisma migrate status

Contribution Guidelines

Please follow the same guidelines with the main project.

TL;DR

Contact

Feel free to join our Discord chat. After join Evrim Ağaçı's server, find us on Periodum channels.