Registration is required to use the team builder (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Navi-27/Proyecto-UPC/llms.txt
Use this file to discover all available pages before exploring further.
/equipo) and My Pokédex (/mi-pokedex) features. The app uses a simple username and password model — passwords are hashed via Werkzeug’s generate_password_hash, which defaults to the pbkdf2:sha256 algorithm. Accounts are stored locally in an SQLite database (pokedex.db) and no email address is required to sign up.
Registration Flow
Navigate to /registro
Open
/registro in your browser, or click the Register link on the login page (¿No tienes cuenta? Regístrate aquí). The page renders the Crear Cuenta form.Fill in your credentials
Enter a unique username and a password in the two form fields. Both fields are required — the form will not submit if either is left blank.
Submit the form
Click Registrarse. The server handles the
POST /registro request and calls Usuario.crear(username, password), which performs three operations:- Hashes the password with
werkzeug.security.generate_password_hash(no plain-text password ever touches the database). - Executes
INSERT INTO usuarios (username, password) VALUES (?, ?)against the SQLiteusuariostable. - Returns
Trueon a successful insert, orFalseif the username already exists (caught by theUNIQUEconstraint onusuarios.username).
Success — redirected to /login
When
Usuario.crear returns True, the server flashes the message “registro exitoso, ya puedes iniciar sesion” (category: success) and issues a 302 redirect to /login. You can now sign in with the credentials you just created.Username Requirements
| Rule | Detail |
|---|---|
| Uniqueness | Every username must be unique across all registered accounts. This is enforced by a UNIQUE constraint on the usuarios.username column at the database level. |
| Length | No minimum or maximum length is enforced by the application — the underlying TEXT NOT NULL column type imposes no practical limit. |
| Characters | Any character accepted by SQLite TEXT is allowed. |
Usernames are case-sensitive.
Ash, ash, and ASH are treated as three distinct accounts.Password Security
Passwords are never stored in plain text. Thewerkzeug.security.generate_password_hash function is called at registration time and produces a hash in the format:
usuarios table. At login, check_password_hash re-derives the hash from the supplied password and compares it to the stored value — the original password is never recoverable from the database.
Database Schema Reference
Theusuarios table that backs registration is created by models/database.py on first run:
id that is used as a foreign key in the equipos and pokedex_usuario tables.