Welcome to SoftwareQualityWithCats, a project that was developed in the second semester of my Masters's degree at the TH Rosenheim in the module Software Quality Assurance.
A detailed description of the architecture and structure of this project can be found in the wiki.
The Cat API https://thecatapi.com is used for this project.
Follow these steps to set up the project on your local machine.
- Node.js 18.17 or later (I used npm for this project)
- Docker
- Docker Compose
- pdAdmin (not mandatory)
To run the application using Docker Compose:
-
Clone the repository:
git clone https://github.com/maex0/SoftwareQualityWithCats.git cd SoftwareQualityWithCats
-
Build and start the containers:
docker-compose up --build
This command builds the images if they do not exist and starts the containers defined in your
docker-compose.yml
. -
Open http://localhost:3000 to view the application.
To run the application locally in development mode:
-
Navigate to the
next
directory:cd next
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
The application will start on http://localhost:3000. The page will reload if you make edits.
To build the application for production:
npm run build
This will create an optimized build of the application in the .next
directory.
To start the production server:
npm start
Here are some of the most useful scripts you can run:
dev
: Runs the application in development mode.build
: Builds the application for production.start
: Starts the application in production mode.lint
: Lints the codebase for potential errors and formatting issues.
I used two different configuaration files (.env
files). One inside the root directory for the postgres database, and the other one inside the next folder for specific frontend or backend related configurations.
These are the environment variables used inside the root folder:
POSTGRES_USER=your_postgres_user
POSTGRES_PASSWORD=your_postgres_password
POSTGRES_DB=your_postgres_db
These are the environment variables used inside the next folder:
DATABASE_URL=your_database_url
API_KEY=your_api_key
API_URL=your_api_url
FAVORITE_COUNT=your_favorite_count
These variables need to be set in order to run the application correctly.
Contributions are welcome! Please follow the following contribution guidelines when submitting pull requests.
-
Fork the repository.
-
Create your feature branch:
git checkout -b feature/YourFeature
-
Commit your changes:
git commit -m 'Add some feature'
-
Push to the branch:
git push origin feature/YourFeature
-
Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.