---
# System prepended metadata

title: Project 3

---

# Project 3

## To Do

- match front end logic with back end
- signup/login/logout
- socket.io - set up, get socket working
    - utilize socket.io to update the game real time

## Brainstorm

Stock keeping app

travel planner app

Project management app

Events Page app

E-Voting System app

iCinema Clone app

### Codenames app*

- login/logout system
    - 
    - after log in prompt to create game
- lobby(future dev)
    - create a lobby
    - join Lobby
- emoji only chat (future dev)
- friend list feature (future dev)

- backend
    - Words (see below)
        - (https://github.com/sagelga/codenames/blob/main/wordlist/en-EN/default/wordlist.txt)
    - Users (see below)
    - Games (see below)
    - Teams
        - (create 2 new teams every game - team Dog and team Cat)
        - multiple users belong to one team
        - 8 or 9 words 
    - Moves
        - associated to one player/team?
        - belongs to one Game
        - User who made the move
        - word selected
        - (for future) would chats/emoji chat go here?
    - WordList - 25 words
        - subset of "Words" - 25 words that belong to one Game
        - neutral words - 7 words
        - team dog words - 8 or 9 words
        - team cat words - 8 or 9 words
        - "death" words - 1 word


    wordSchema = new Schema({
        word: string
    })
    
    userSchema = new Schema({
        username: string,
        email: string,
        password: string,
        team: [Teams _id: id] // assigned when game starts
        isSpyMaster: boolean // assigned when game starts
        wins: integer,
        losses: integer
    })
    
    gameSchema = new Schema({
        name: string, randomly generated (3 words?)
        team: [
            { team one },
            { team two }
        ],
        startTeam: either team one or team two's id?,
        moves: ref: 'move' 
        neutralWords: 
        teamDogWords: 
        teamCatWords:
        deathWord:
        
                
    })


when a game is created

1. Create Game
    a. choose 25 random words from Word.findAll
3. Create 2 Teams
    a. 1 team should be team Cat (isTeamDog = false)
    b. 1 team should be team Dog
5. Assign words 1-9 to team Cat
6. assign words 10-17 to team Dog
7. assign half of players to team Cat, assign the others to team dog
8. assign Spy Masters
