# Project export: TeamMatcher

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 10.0
- Tagline: Hello, we are Team Matcher, a platform dedicated to helping users find the perfect project partners to achieve their academic and professional success.
- Devpost: https://devpost.com/software/teammatcher
- GitHub: https://github.com/b991/TeamMatcher
- Video: https://www.youtube.com/embed/GzLijDMhdM8?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 2 GitHub contributor(s) — Beiqi Wang (6 commits), william-lyh (5 commits)

## Devpost submission (written by the team)

### Inspiration

Hello, we are Team Matcher, a platform dedicated to helping users find the perfect project partners to achieve their academic and personal goals.

### What it does

Discovering the right project partner can be a formidable task. Success in any project hinges not just on what you work on, but also on who you collaborate with. Welcome to Team Matcher, your gateway to finding ideal project partners. Engaging questions are presented to users, inviting them to show their personalities and who they are. Together, we will craft meaningful projects.

### How we built it

We built Team Matcher using HTML, CSS, Figma, and TailwindCSS, and Flask.

### What's next

Build team matching algorithm that helps users to find partners that best match their teams' needs. Create a real time chat function so that users can directly talk to potential team members. Adding more questions to user profile to let users demonstrate themselves more.

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

Indexed codebase: 24 recognized source files, 123 KB.
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Python (language) — detected in the code
- Flask (technology) — claimed on Devpost, not found in the code
- Tailwind CSS (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (28 of 28)

```
.gitignore
.idea/.gitignore
.idea/dataSources.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/inspectionProfiles/Project_Default.xml
.idea/misc.xml
.idea/modules.xml
.idea/TeamMatcher.iml
.idea/vcs.xml
app.py
archive templates/home.html
instance/db.sqlite
src/css/input.css
static/css/costum.css
static/css/output.css
static/javascript/script.js
tailwind.config.js
templates/dashboard.html
templates/grid.html
templates/login.html
templates/post.html
templates/profile.html
templates/profileProjects.html
templates/profileQ.html
templates/project.html
templates/register.html
templates/registerQuestion.html
templates/template.html
```

### Dependencies

No dependency index available.

### Recent commits (newest first)

- change nav bar text
- changed profile coloring
- fix grid view styling
- in the process of fixing profile
- make star icon
- change routing for the dashboard
- added dashboard and grid view for partner
- need to fix scroll
- create profileProjectsPage
- finish fixing profile
- add flash message for register/logout
- add profile proj page
- fix routing for login/register
- unmerged file
- hello
- add favicon
- implement profile questions
- add additional profile page
- implement backend
- finish front-end

## Key source files (fetched from GitHub, selected and truncated for size)

### app.py

```python
from flask import Flask,flash
from flask import request, render_template, redirect
from flask_login import LoginManager, UserMixin, login_user, logout_user, login_required, current_user
import bcrypt
from flask_sqlalchemy import SQLAlchemy

login_manager = LoginManager()
match_app = Flask(__name__)
login_manager.init_app(match_app)
match_app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///db.sqlite"
match_app.config["SECRET_KEY"] = "KEY"
db = SQLAlchemy()
db.init_app(match_app)

class User(UserMixin, db.Model):
    __tablename__ = 'user'

    id = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String, unique=True, nullable=False)
    pwd = db.Column(db.String, nullable=False)
    first_name = db.Column(db.String, nullable=True)
    last_name = db.Column(db.String, nullable=True)
    projects = db.Column(db.String, nullable=True)
    fav_class = db.Column(db.String, nullable=True)
    class_taken = db.Column(db.String, nullable=True)
    fear = db.Column(db.String, nullable=True)
    weekend = db.Column(db.String, nullable=True)
    highlight = db.Column(db.String, nullable=True)
    lookfor = db.Column(db.String, nullable=True)
    skill = db.Column(db.String, nullable=True)
    connect = db.Column(db.String, nullable=True)
    weakness = db.Column(db.String, nullable=True)
    hobby = db.Column(db.String, nullable=True)

class Project(db.Model):
    __tablename__ = 'project'

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String, nullable=False)
    requirement = db.Column(db.String, nullable=False)
    description = db.Column(db.String, nullable=False)
    created_by = db.Column(db.Integer, nullable=False)
    complete = db.Column(db.Integer, nullable=False)

with match_app.app_context():
    db.create_all()

@login_manager.user_loader
def user_loader(user_id):
    return User.query.get(user_id)

@match_app.route('/register', methods=["GET", "POST"])
def register():
    if request.method == "POST":
        email = request.form.get("email")
        pwd_hashed = bcrypt.hashpw(request.form.get("pwd").encode('utf-8'), bcrypt.gensalt())
        user = User(email=email, pwd=pwd_hashed, first_name=None, last_name=None)
        db.session.add(user)
        db.session.commit()
        flash('You are successfully registered! Now try logging in : )')
        return redirect("/login")
    return render_template("register.html")

@match_app.route('/register-q', methods=['GET', 'POST'])
@login_required
def registerQuestion():
    if request.method == "POST":
        first_name = request.form.get("first-name")
        last_name = request.form.get("last-name")
        fav_class = request.form.get("fav_class")
        class_taken = request.form.get("class_taken")
        user = current_user
        user.first_name = first_name
        user.last_name = last_name
        setattr(user, "fav_class", fav_class)
        setattr(user, "class_taken", class_taken)
        db.session.commit()
        return redirect("/profileQ")
    return render_template("registerQuestion.html")

@match_app.route('/project', methods=['GET'])
@login_required
def project():
    id = request.args.get('id')
    project = Project.query.filter_by(id=id).first()
    creator = User.query.filter_by(id=project.created_by).first()
    return render_template("project.html",
                           name=project.name,
                           requirement=project.requirement,
                           description=project.description,
                           created_by="{} {}".format(creator.first_name, creator.last_name),
                           email=creator.email,
                           created_by_id=project.created_by
                           )

@match_app.route('/post', methods=['GET', 'POST'])
@login_required
def post():
    if request.method == "POST":
        name = request.form.get("name")
        requirement = request.form.get("requirement")
        description = request.form.get("description")
        user = current_user
        created_by = user.id
        complete = 0
        project = Project(name=name, requirement=requirement, description=description,
                          created_by=created_by, complete=complete)
        db.session.add(project)
        db.session.commit()
        if user.projects:
            user.projects += " {}".format(project.id)
        else:
            user.projects = "{}".format(project.id)
        db.session.commit()
        return redirect("/browse")
    return render_template("post.html")

@match_app.route('/complete', methods=['GET'])
@login_required
def complete():
    id = request.args.get('id')
    project = Project.query.filter_by(id=id).first()
    user = current_user
    if project.created_by == user.id:
        project.complete = 1
        db.session.commit()
    return redirect("/profile")

@match_app.route('/profile', methods=['GET'])
@login_required
def profile():
    user = current_user
    id = request.args.get('id')
    if id is not None:
        user = User.query.filter_by(id=id).first()
        if user is None:
            user = user
    return render_template("profile.html",
                           me=(user.id == current_user.id),
                           user_id=user.id,
                           first_name=user.first_name,
                           last_name=user.last_name,
                           email=user.email,
                           fav_class=user.fav_class if user.fav_class is not None else " ",
                           class_taken=user.class_taken if user.class_taken is not None else " ",
                           fear=user.fear if user.fear is not None else " ",
                           weekend=user.weekend if user.weekend is not None else " ",
                           highlight=user.highlight if user.highlight is not None else " ",
                           lookfor=user.lookfor if user.lookfor is not None else " ",
                           skill=user.skill if user.skill is not None el
[truncated — 5198 more characters]
```

### tailwind.config.js

```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{html,js}"],
  theme: {
    extend: {},
  },
  plugins: [require("@tailwindcss/forms")],
};

```

### .idea/vcs.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>
```

### .idea/modules.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/TeamMatcher.iml" filepath="$PROJECT_DIR$/.idea/TeamMatcher.iml" />
    </modules>
  </component>
</project>
```

### .idea/misc.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Black">
    <option name="sdkName" value="Python 3.8 (TeamMatcher)" />
  </component>
  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (TeamMatcher)" project-jdk-type="Python SDK" />
</project>
```

### .idea/dataSources.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
    <data-source source="LOCAL" name="db" uuid="5560dca6-46e8-4f3a-98d5-6de1842d2feb">
      <driver-ref>sqlite.xerial</driver-ref>
      <synchronize>true</synchronize>
      <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
      <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/instance/db.sqlite</jdbc-url>
      <working-dir>$ProjectFileDir$</working-dir>
      <libraries>
        <library>
          <url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.43.0/org/xerial/sqlite-jdbc/3.43.0.0/sqlite-jdbc-3.43.0.0.jar</url>
        </library>
      </libraries>
    </data-source>
  </component>
</project>
```

### archive templates/home.html

```html
{% extends 'template.html' %}

{% block title %}
  Team Matcher
{% endblock %}

{% block body %}
    <div class ="container max-w-7xl mx-auto">
        <ul role="list" class="divide-y divide-gray-400">
            {% if num_projects == 0 %}
                <li class="flex items-center justify-between gap-x-6 py-5">
                    <div class="min-w-0">
                        <div class="flex items-start gap-x-3">
                            <p class="text-sm font-semibold leading-6 text-gray-900"> No current project </p>
                        </div>
                    </div>
                </li>
            {% endif %}
            {%for i in range(0, num_projects)%}
                <li class="flex items-center justify-between gap-x-6 py-5">
                    <div class="min-w-0">
                        <div class="flex items-start gap-x-3">
                            <p class="text-sm font-semibold leading-6 text-gray-900">{{ names[i] }}</p>
                        </div>

                            <div class="mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-700">
                            <p class="truncate">Created by {{ creators[i] }}</p>
                            </div>


                        <div class="flex items-start gap-x-3">
                            <p class="mt-2 flex items-center gap-x-2 leading-5  text-sm text-gray-500">
                                {{ descriptions[i] }}
                            </p>
                        </div>
                    </div>
                    <div class="flex flex-none items-center gap-x-4">
                        <a href="/project?id={{ ids[i] }}"
                            class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block">View
                            project<span class="sr-only"></span></a>
                    </div>
                </li>
            {%endfor%}

        </ul>
    </div>
{% endblock %}

```

### templates/project.html

```html
{% extends 'template.html' %}

{% block title %}
  Team Matcher | View Project
{% endblock %}

{% block body %}
    <div class = "container max-w-7xl mx-auto">
        <div class = "mt-10">
            <div class="px-4 sm:px-0">
                <h2 class="font-semibold text-lg text-gray-900">Project Information</h2>
            </div>
            <div class="mt-6 border-t border-gray-100">
                <dl class="divide-y divide-gray-100">
                    <div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
                        <dt class="text-sm font-medium leading-6 text-gray-900">Project Name</dt>
                        <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ name }}</dd>
                    </div>
                    <div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
                            <dt class="text-sm font-medium leading-6 text-gray-900">Created By</dt>
                            <a class = "hover:cursor-pointer">
                            <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ created_by }}</dd>
                            </a>
                    </div>
                    <div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
                        <dt class="text-sm font-medium leading-6 text-gray-900">OP's Email address</dt>
                        <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0"> {{ email }}</dd>
                    </div>
                    <div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
                        <dt class="text-sm font-medium leading-6 text-gray-900">What is OP looking for: </dt>
                        <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ requirement }}</dd>
                    </div>
                    <div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
                        <dt class="text-sm font-medium leading-6 text-gray-900">Description</dt>
                        <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ description }}</dd>
                    </div>
                </dl>
            </div>
            <div class="mx-auto mt-20 max-w-xl sm:mt-20">
                    <a href="/profile?id={{ created_by_id }}"
                        class="block w-full rounded-md bg-gray-600 mt-5 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-sm hover:bg-gray-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600">
                        View OP's Profile</a>
            </div>
        </div>
    </div>
{% endblock %}

```

### templates/post.html

```html
{% extends 'template.html' %}

{% block title %}
  Team Matcher | Post Project
{% endblock %}

{% block body %}
    <div class="mx-auto mt-20 max-w-2xl text-center ">
        <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">Create New Project</h2>
        <p class="mt-2 text-lg leading-8 text-gray-600">Let's start building your team!
        </p>
    </div>
    <form action="#" method="POST" class="mx-auto  mt-10 max-w-xl sm:mt-20">
        <div class="grid grid-cols-1 gap-x-8 gap-y-6 sm:grid-cols-2">
            <div class="sm:col-span-2">
                <label for="name" class="block text-sm font-semibold leading-6 text-gray-900">Project Name</label>
                <div class="mt-2.5">
                    <input type="text" name="name" id="name"
                        class="block w-full rounded-md border-0 px-3.5 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
                </div>
            </div>
            <div class="sm:col-span-2">
                <label for="requirement" class="block text-sm font-semibold leading-6 text-gray-900">What you're looking
                    for in a partner?</label>
                <div class="mt-2.5">
                    <input type="text" name="requirement" id="requirement"
                        class="block w-full rounded-md border-0 px-3.5 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
                </div>
            </div>
            <div class="sm:col-span-2">
                <label for="description" class="block text-sm font-semibold leading-6 text-gray-900">Project
                    Description</label>
                <div class="mt-2.5">
                    <textarea type="text" name="description" id="description" rows="4"
                        class="block w-full rounded-md border-0 px-3.5 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"></textarea>
                </div>
            </div>
        </div>
        <div class="mt-10">
            <button type="submit"
                class="block w-full rounded-md bg-blue-600 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600">
                Create Project</button>
            <a href="/"
                class="block w-full rounded-md bg-gray-600 mt-5 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-sm hover:bg-gray-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600">
                Keep Browsing</a>
        </div>
    </form>
{% endblock %}

```

### templates/profileProjects.html

```html
{% extends 'template.html' %}


{% block title %}
 Team Matcher | My Profile
{% endblock %}


{% block body %}
<div class="container max-w-7xl mx-auto">
   {% if num_projects< 1 %}
       <h1 class = "text-center pt-5"> there are no tasks. Create one below</h1>
       <div class = "flex flex-col items-center ">
           <a href="/post"
       class="rounded-md bg-gray-600 mt-5 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-sm hover:bg-gray-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600">
       Post new project</a>
       </div>
   {% else %}
   <ul role="list" class="divide-y divide-gray-400">
               {%for i in range(0, num_projects)%}
                   <li class="flex items-center justify-between gap-x-6 py-5">
                       <div class="min-w-0">
                           <div class="flex items-start gap-x-3">
                               <p class="text-sm font-semibold leading-6 text-gray-900">{{ names[i] }}</p>
                               {% if completes[i] == 1 %}
                                   <p
                                   class="rounded-md whitespace-nowrap mt-0.5 px-1.5 py-0.5 text-xs font-medium ring-1 ring-inset text-green-700 bg-green-50 ring-green-600/20">
                                   Complete
                                   </p>
                               {% endif %}
                           </div>
                           <div class="flex items-start gap-x-3">
                               <p class="mt-2 flex items-center gap-x-2 leading-5  text-sm text-gray-500">
                                   {{ descriptions[i] }}
                               </p>
                           </div>
                       </div>
                       <div class="flex flex-none items-center gap-x-4">
                           <a href="/project?id={{ ids[i] }}"
                               class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block">View
                               project<span class="sr-only"></span></a>
                           {% if me == True and completes[i] == 0 %}
                               <a href="/complete?id={{ ids[i] }}"
                                   class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block">Mark
                                   Complete<span class="sr-only"></span></a>
                           {% endif %}
                       </div>
                   </li>


               {%endfor%}
   </ul>
   {% endif %}
    <div class = "flex flex-col items-center ">
        <a href="/profile?id={{user_id}}"
       class="rounded-md bg-gray-600 mt-5 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-sm hover:bg-gray-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600">
       go back to {{first_name}}'s profile</a>
    </div>
</div>


{% endblock %}
```

[14 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]