Website that allows users to play a mind reader game.
The game is simple: one user is given a word, and the other person has to guess it using related words.
- AdonisJS
- SSR with AdonisJS (InertiaJS - React)
- UnoCSS
- BiomeJS
- Redis
- PostgreSQL
- Docker
The Makefile
provides shortcuts for common tasks. Below is a list of available commands.
make install
- Install dependencies withpnpm
.make docker-dev
- Run the development environment using Docker.make docker-prod
- Run the production environment using Docker.make migrate
- Run database migrations.make seed
- Seed the database with initial data.make rollback
- Rollback all migrations.make test
- Run tests.make lint
- Check code format and linting.make lint-fix
- Fix code format and linting issues.
make init-dev
- Set up the development environment: installs dependencies, runs Docker, migrates and seeds the database, and starts the dev server.make init-prod
- Set up the production environment: installs dependencies, runs Docker, and migrates the database.make reset-db
- Rollback all migrations, rerun migrations, and seed the database.
make jobs
- Run background jobs withpnpm jobs:run
.make offline
- SetBYPASS_LOGIN=1
in.env
to enable offline mode.
-
Clone the Repository
git clone https://github.com/prisca-c/mind-reader.git cd mind-reader
-
Copy Environment Variables Copy
.env.example
to.env
and populate the required variables. -
Run
make init-dev
This command will:- Install dependencies
- Set up Docker for development
- Run migrations and seed the database
- Once make is done, you can run
make serve
andmake jobs
in separate terminals.
-
Access the App Open http://localhost:3333 in your browser.
-
Clone the Repository
-
Copy Environment Variables Copy
.env.example
to.env
and fill in the variables. -
Run
make init-prod
This command will:- Install dependencies
- Set up Docker for production
- Run migrations
To bypass social login, set BYPASS_LOGIN=1
in your .env
file
This allows login with a default user:
await this.userRepository.findOrCreate('[email protected]', {
username: 'RandomUser',
avatarUrl: null,
providerId: 1,
});
The following commands allow you to manage your database:
- Run Migrations:
make migrate
- Seed the Database:
make seed
- Rollback Migrations:
make rollback
- Reset Database:
make reset-db
To run tests, use:
make test
To check code formatting and linting:
make lint
To automatically fix formatting and linting issues:
make lint-fix