View on GitHub

DevQuest Test Run 2024

DevQuest is an international hackathon organized under the tertiary category of CODEFEST, aimed at showcasing the unique talents, creativity, and innovations of undergraduates from universities and institutes worldwide.

Welcome to DevQuest Test Run 2024

DISCLAIMER: Please note that this project is created only for DevQuest Test Run 2024 organized by SLIIT.

  1. Setting up your environment
  2. Solving the challenges
  3. Getting support
  4. References

Setting up your environment

This section helps you to understand the prerequisites required and how to work with the codebase. Please read through carefully and follow the instructions to understand the codebase of this project.

Prerequisites (Mandatory)

Installations of stable versions of Git, Node.js and npm are required on your computer. You must also be proficient in working with the aforementioned technologies.

Install Git
Install NodeJS 18.18.0

Recommended: To ensure seamless management of multiple Node.js versions on your machine, it is highly recommended to use a Node Version Manager (NVM).

    For Windows -: Download the .exe file
    Mac and Linux -: Refer this


For macOS users, it is recommended to prepend sudo to the installation commands to ensure they have the required permissions.

We recommend that you use Visual Studio Code and install the Live Server extension for a better developer experience.

Clone the project to your local computer

The Git repository URL and credentials will be available at the start of the contest through a link.

Use Git to clone the project to the local development environment using the credentials that will be shared with the team leader.

Note for Windows users: Use cmd as the terminal to run commands.

Installing dependencies

Once you clone the project from your team’s Git repository, run the following command to install dependencies.

Rename env file

The repository contains an environment configuration file. Please rename it to .env to follow standard conventions for environment variable management.

Validate if the environment is correctly setup

You can run the Sanity test file in the tests directory with the below command.

For Windows users,

Note: If you get an error while running this command, make sure you have set all the prerequisites correctly on your machine.

Setting up the development database

The following commands will create a SQLite database called main.sqlite3 in your root folder for development purposes. The migrate command deletes the existing database and creates a new one with the DB schema, whereas the seed command populates the DB with some initial data. These steps are required for running the application.

If you do change db/seeds/** files, the database schema changes with migrations and it may break your test cases and the application. Therefore, ensure not to change or modify files within the db and tests directories.

Building and running the application

To start the server (without nodemon) use the following command:

Click on the index.html file and click on the option “Open with Live Server” as shown in the screenshot below.

Add .gitignore

You will have to note that the project code has no .gitignore file. Please add a .gitignore file with the following content.

node_modules
config/node_modules
.env
.idea
package-lock.json
.vscode
*.sqlite3
*.xml

It is advised that one member of your team create the file, commit, and push the .gitignore file to the remote repository with the following commands.

Commit and Push code to origin

Then other team members can pull the changes from the remote repository to receive the .gitignore file to their local machines.

This is how you may use git to collaborate as a team to solve challenges.

Overview

The Movie Rental System is a web application that allows users to browse, rent, and get recommendations for movies. The system includes features for user authentication, movie management, and rental processing. It also provides an admin interface for managing movies and viewing rental statistics. The system uses k-means clustering to group users based on their rental patterns and provides personalized movie recommendations.

You can use the following credentials to log in as an admin, and an already existing user in seed data. Navigate the application using the main menu.

ADMIN

USER

Executing the Tests

Use the below commands to run the tests. When you FIRST run, all the tests except _sanity.test will fail. This is expected.

As you complete the challenges, the respective tests will be passed one by one. When you complete all the tasks of a challenge, all tests of the respective challenge should pass. Every DevQuest challenge has a test case that you can run to validate the successful completion of the challenge.

Note: Tests are not using the main.sqlite3 database. Every test creates an isolated in-memory database.

Legitimacy of your solution

Any attempt to compromise the integrity of the contest will unconditionally disqualify your team. Therefore please ensure you avoid attempting:

Improving your developer Experience (Optional)

This step is not mandatory to work on the DevQuest challenges, but it may improve your development experience.

Solving the challenges

You can now try out the Challenge 0 for the test run.

If your sanity test passes and you are able to run the application, now you can proceed to the challenges. All the DevQuest challenges are documented in their own file. Please visit the links below, read them carefully, and get started solving them.

Although the challenges are independent from one another, it will be easier for you to solve them somewhat sequentially to understand the challenges better.

Note: We also have provided you with some challenges related to the features of the application that will not be evaluated for the competition.

Happy coding !

Getting support

There will be minimal to no support available on the context day. We are not in a position to clarify challenge descriptions on an individual basis. However, in case of a setting up the project need, you may contact the technical support team via a chat on WhatsApp (No support for technical doubts) to the phone number +94 71 382 6109.

In case of non-technical support you may reach out to the DevQuest Support Contact No. +94 70 233 4139 via calls only.

References