The Database Destroyer is a project that aims to [provide a brief description of the project's purpose or goal].
Before getting started, ensure you have the following installed on your system:
- Node.js
- Yarn package manager
- Docker
-
Clone the repository:
git clone https://github.com/tonyvu0605/DatabaseDestroyer.git
-
Navigate to the project base directory:
cd DatabaseDestroyer
-
Install the dependencies in the
/client
and/api
directories using Yarn:cd client yarn install cd ../api yarn install
To start the application, use Docker Compose. Ensure the configurations in .env
and src/secrets/*
are set up correctly.
docker compose -f compose.yaml up --build
This command will build the Docker images (if necessary) and start the containers defined in the compose.yaml
file.
To stop and remove the Docker containers, use the following command:
docker compose -f compose.yaml down
To also remove the associated volumes, add the -v
flag:
docker compose -f compose.yaml down -v
This project uses ESLint for linting JavaScript and TypeScript files. To run the linter, use the following command:
yarn lint
To automatically fix fixable linting issues, use the lint:fix
script:
yarn lint:fix
This project uses Prettier for code formatting. To format the code, use the following command:
yarn prettier
Docker Compose is used to define and run multi-container Docker applications. The compose.yaml
file specifies the services and their configurations.
For more information on running the application with Docker Compose, refer to the Running the Application section.
The package.json
file contains several scripts that you can use to perform various tasks:
start
: Starts the application using Nodemon and enables debugging.rm:all
: Removes thenode_modules
,.next
,yarn.lock
,out
,dist
, andbuild
directories.re:start
: Removes all the generated files and directories, reinstalls the dependencies, and starts the application.lint
: Runs ESLint on the JavaScript and TypeScript files in thesrc
directory.lint:fix
: Runs ESLint with the--fix
flag to automatically fix fixable issues.prettier
: Runs Prettier to format the JavaScript and TypeScript files in thesrc
directory.
You can run these scripts using the yarn
command followed by the script name. For example:
yarn start