This application allows you to create and manage a digital escape room experience using Django combined with Wagtail CMS.
Participants start at the Homepage and navigate through the rooms by solving puzzles. Each room can grant them keys to unlock new rooms or reveal further content within the same room, depending on how you set up the keys and content. The structure is flexible, allowing you to create a customized experience.
-
Build the Docker Image: Ensure Docker is installed on your system. Navigate to the root directory of this project and build the Docker image using the provided Dockerfile.
make build
-
Run the Container: Start the application by running the Docker container.
make runserver
The application should now be accessible at
http://localhost:8000
.
This application comes with a pre-configured db.sqlite3
file to help you get started quickly. This includes a default admin user that you can use to log into the Wagtail CMS and Django admin interfaces immediately after starting the application.
To log into the Wagtail CMS, navigate to:
http://127.0.0.1:8000/admin
username: admin
password: admin
Here, you can manage your escape room's pages, including the Homepage and RoomPages, as well as configure the main menu and user permissions.
Upon logging in for the first time, it's recommended to explore the Wagtail CMS interface to familiarize yourself with the structure of the escape room application. Consider updating the default admin password for security and reviewing the pre-configured pages to understand how they are set up. Below we explain more in detail how to setup the escape room.
First, create a Homepage for your escape room. This will serve as the entry point for participants.
- Navigate to the Wagtail CMS admin interface at
http://127.0.0.1:8000/admin
. - Go to "Pages" and create a new page and select "Homepage" as the page type.
- Fill in the details for the Homepage, including the title and body.
- Publish the page.
IMPORTANT: You should setup the Homepage as the root page of the site. This can be done by going to the "Settings" -> "Sites" section of the Wagtail CMS admin and selecting the Homepage as the root page. This will ensure that the Homepage is the first page participants see when they access the escape room. When running locally the site is 127.0.0.1 and port is 8000.
- Title: The name of your escape room, displayed prominently on the homepage.
- Body: A welcome message or introduction to the escape room experience.
Add rooms as children of the Homepage. Each room can have its own puzzles, keys, and narrative.
- From the Homepage, add a child page.
- Select "RoomPage" as the page type and fill in the details.
- Title: The name of the room.
- Unlock Key: The key required to access this room. Leave blank if no key is needed.
- First Stage Body: The initial content or puzzle of the room after the room is unlocked.
- Second Stage Unlock Key: The key to unlock the second stage within the room.
- Second Stage Body: Additional content unlocked with a second key, for a layered puzzle experience. Most of the times you give a hint or a clue to the next room and the key to unlock it.
For a page to appear in the navigation menu, it must be marked as visible in the menu. To add pages to the menu:
- Make sure that a page is set to be visible in the menu. This can be done by checking the "Show in menus" checkbox in the "Promote" tab when editing a page.
- Navigate to Wagtail CMS -> Settings -> Main menu.
- Add the visible pages and reorder them as needed.
Creating rooms as children of another RoomPage allows you to create submenus in the navigation. The parent room acts as a container or grouping mechanism and does not serve as a puzzle room itself. This is useful for organizing your escape room into sections or themes.
-
Open
escaperoom/settings.py
and set theDATABASES
configuration to use a new database. The most simple is a local SQLite database, which is already configured in the settings file. You can change theNAME
field to use a different file name if you wish.DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'new_db.sqlite3', } }
To use a different database, such as PostgreSQL or MySQL, update the DATABASES
configuration accordingly. You can find more documention on how to configure the database in the Django documentation.
-
Run the setup. This will build the Docker image, run the necessary migrations, and will prompt you to create a superuser at the end.
make setup
-
Start the application.
make runserver
-
Access the Wagtail CMS and Django admin interfaces to start creating your escape room.
To remove the application and the database, run the following command:
- If the server is still running first stop it.
make stopserver
- Remove the Docker container and the created volume.
make uninstall
- Customization: Feel free to customize the look and feel of the escape room by extending the templates and static files.
- User Management: Wagtail CMS provides robust user management features, allowing you to control access to the CMS for creating and updating rooms with multiple users!
- Django Admin: The Django admin interface is also available for managing the database and user accounts. You can access it at
http://127.0.0.1:8000/django-admin
.
Enjoy building your digital escape room experience!