Skip to main content

Get Relaciona running locally

This guide will help you set up Relaciona from clone to first class creation in under 10 minutes.
1

Clone the repository

Clone the Relaciona repository to your local machine:
git clone https://github.com/dgarridor05/AplicacionPracticas.git
cd AplicacionPracticas
2

Set up Python environment

Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
Relaciona requires Python 3.11 or higher. Check your version with python --version
3

Install dependencies

Install all required Python packages:
pip install -r requirements.txt
This installs:
  • Django 4.2.27 (web framework)
  • PostgreSQL driver (psycopg2-binary)
  • Cloudinary integration (for profile pictures)
  • WhiteNoise (static file serving)
  • Gunicorn (production server)
4

Configure environment variables

Create a .env file in the project root:
touch .env
Add the following configuration:
.env
# Django Core
SECRET_KEY=your-secret-key-here-make-it-long-and-random
DEBUG=True

# Database (PostgreSQL)
DB_NAME=relaciona_db
DB_USER=your_username
DB_PASSWORD=your_password
DB_HOST=localhost
DB_PORT=5432

# Cloudinary (for profile pictures)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
For quick local testing, you can skip Cloudinary setup initially, but profile picture uploads won’t work. See Installation & Setup for full Cloudinary configuration.
5

Set up the database

Create a PostgreSQL database:
# Access PostgreSQL
psql -U postgres

# Create database
CREATE DATABASE relaciona_db;

# Exit PostgreSQL
\q
Run Django migrations:
python manage.py migrate
This creates all necessary tables including:
  • User profiles (students and teachers)
  • Class groups with invite codes
  • Quiz results and assessments
  • Game session data
6

Create a superuser

Create an admin account to access Django admin:
python manage.py createsuperuser
Follow the prompts to set username, email, and password.
7

Start the development server

Launch the Django development server:
python manage.py runserver
Open your browser to http://localhost:8000
The server runs on port 8000 by default. Use python manage.py runserver 8080 to use a different port.

Create your first teacher account

Now that Relaciona is running, let’s create your first teacher account and class.
1

Register as a teacher

  1. Navigate to http://localhost:8000
  2. Click Register or go to /accounts/register/
  3. Fill in the registration form:
    • Choose username and password
    • Select Profesor (Teacher) as your role
  4. Click Register
You’ll be redirected to the login page with a success message.
2

Log in and create a class

  1. Log in with your new teacher credentials
  2. You’ll land on the teacher home page
  3. Click Create Class or navigate to /teachers/create-group/
  4. Enter a class name (e.g., “Math 101” or “Spanish 3B”)
  5. Click Save
A unique 6-character invite code is automatically generated for each class (e.g., A3X9K2). Students will use this code to join your class.
3

View your class details

After creating the class, you can:
  • View the invite code to share with students
  • See the list of enrolled students (empty initially)
  • Access class statistics and analytics
  • Manage student profiles
Your class is located at: relaciona/settings.py:62

Test with a student account

1

Create a student account

  1. Log out from the teacher account
  2. Go to the registration page
  3. Create a new account with role Alumno (Student)
2

Join the class

  1. Log in as the student
  2. Navigate to Join Class or enter the URL /teachers/join-class/
  3. Enter the 6-character invite code from your teacher account
  4. Click Join
The student is now enrolled in the class!
3

Complete the student profile

  1. Go to Edit Profile (student home → Edit Profile)
  2. Fill in profile information:
    • Upload a profile picture
    • Add full name, nickname, date of birth
    • Enter favorite song, artist, movie
    • Add interests and reflection questions
  3. Enable Share with class to make profile visible in games
  4. Save the profile
See Completing Your Profile for detailed field descriptions.

Start playing games

With at least 2 students who have completed profiles, you can start playing!

Hangman

Guess classmate names letter by letter

Face Guess

Match photos to student names

Spotify Mystery

Guess whose favorite song is playing

All Games

Explore all 10+ available games

Next steps

Full Installation Guide

Detailed setup including PostgreSQL, Cloudinary, and production config

Environment Variables

Complete reference for all configuration options

Deploy to Production

Deploy to AWS, Vercel, or your preferred platform

For Teachers

Learn about managing classes and viewing analytics
Need help? Check the GitHub repository or review the full installation guide.

Build docs developers (and LLMs) love