DEV Community

cychu42
cychu42

Posted on

Starchart: Planning Toward Release 0.1

This week, we some planning for Starchart release 0.1.
The first waves of issues were filed, and tasks were assigned to the team members. I'm to contribute in setting up database schema and the ORM, Prisma, as well as finding out how to run it in Docker.

My Issues

I filed 7 issues in total:
Issue #6 is about adding a wiki entry for Prisma to serve as a start point for helping team members looking into the technology.
Issue #9 is about notifying users about their SSL certificate request status via email
Issue #10 centers around creating a page for user to view information of SSL certificate they have requested.
Issue #11 talks about a feature to notify users about their SSL certificate expiration and next-steps
Issue #12 is regarding documentation for helping developers setup their local environment for development of this project.
Issue #13 is regarding documentation for helping developers follow flow of contribution to contribute to the project.
Issue #16 is for creating a certificate table in the database to record information of SSL certificate created.

Technology Research

Because much of the tech stack is new to me, I have to spend time reading the documentations to familiarize myself with it.
Since I try to focus on database, my primary focus is on MySQL and Prisma, which is the primary way the project uses to interact with a MySQL database.
In my research, I found information for how to set up Prisma for a MySQL database, and I have tried the steps.
Through commands, one can run a .prisma file to push/pull table schema to/from the target database. One can also run commands to run a file with code that essentially act like SQL statements.

Here are some basic CLI commands:

  • npx prisma db pull to pull database tables into your schema file.
  • npx prisma generate to sync client to current schema in the local schema file; do this before you do CRUD SQL operation via prisma.
  • npx ts-node <file location> to execute CRUD operation code in the file.
  • npx prisma migrate dev --name <any migration name> to migrate your schema.prisma file to target database. Because prisma make a shadow database (temporary) every time to make sure database is sync, use npx prisma database push if you don’t have right to make another database (no benefit from shadow database)
  • npx prisma studio to start Prisma studio, the visual editor UI for database.

Also, I tried to look up how to run MySQL database in Docker. It seems you need to download an image of a MySQL database, and then create an instance in Docker, as detailed on MySQL's website.
The Docker documentation suggests an one-line command to do so:docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag.

Top comments (0)