Clone the repository
git clone https://github.com/gannont14/PointOfContactAPI.gitCreate a virtual environment
python3 -m venv .venvActivate the virtual environment
source ./.venv/bin/activateInstall the requirements
pip install -r requirements.txtSet the Flask environment variable
export FLASK_APP=flaskrRun the flask app
flask run- Example proof of concept web app, using the API to allow the user to search for results based on product name or repository name, as well as autocompletion with fuzzy finding with Levenshtein distance algorithm
While having the flask application running, create a new terminal instance,
Activate the virtual environment in the repository again,
source ./.venv/bin/activateRun the example web app
streamlit run streamlit/main.pyIf you want to add more data on top of the sample data, you can run the database population script
python3 flaskr/demo/populate_db.pyGET /api/repos
Parameters:
search_query=repo_name[
{
"repo name": "string",
"repo url": "string",
"product name": "string",
"first name": "string",
"last name": "string",
"email": "string",
"chat username": "string",
"location": "string",
"role": "string"
}
]- Example using a search query of "Enterprise-wide-empowering-circuit-repo"
GET /api/repos
Parameters:
search_query=enterprise-wide-empowering-circuit-repo[
{
"repo name": "Enterprise-wide-empowering-circuit-repo",
"repo url": "https://github.com/sc1701d/enterprise-wide-empowering-circuit-repo",
"product name": "Enterprise-wide empowering circuit",
"first name": "Erika",
"last name": "McKnight",
"email": "erica.mcknight@sc1701d.com",
"chat username": "@erikamcknight",
"location": "Chicago, IL",
"role": "Scrum Master"
}
]GET /api/products
Parameters:
search_query=repo_name[
{
"product name": "string",
"first name": "string",
"last name": "string",
"email": "string",
"chat username": "string",
"location": "string",
"role": "string"
}
]- Example using a search query of "Managed systematic Intranet"
GET /api/products
Parameters:
search_query=managed systematic intranet[
{
"product name": "Managed systematic intranet",
"first name": "Chad",
"last name": "Hunt",
"email": "chad.hunt@sc1701d.com",
"chat username": "@chadhunt",
"location": "Bloomington, IN",
"role": "Scrum Master"
}
]GET /api/products/all_contacts
Parameters:
product_name=product_name- Returns a list of all contacts associated with a project, and their roles
[
{
"product name": "string",
"first name": "string",
"last name": "string",
"email": "string",
"chat username": "string",
"location": "string",
"role": "string"
},
"..."
]- Example using a search query of "fundamental optimizing paradigm"
GET /api/products/all_contacts
Parameters:
product_name=fundamental optimizing paradigm[
{
"product name": "Fundamental optimizing paradigm",
"first name": "Gregory",
"last name": "Barton",
"email": "gregory.barton@sc1701d.com",
"chat username": "@gregorybarton",
"location": "Berlin, DE",
"role": "Scrum Master"
},
{
"chat username": "@michaelbaker",
"email": "michael.baker@sc1701d.com",
"first name": "Michael",
"last name": "Baker",
"location": "Berlin, DE",
"product name": "Fundamental optimizing paradigm",
"role": "Product Owner"
},
"..."The application was optimized and tested with a substantial dataset:
- 5,000 unique products
- 6 team members per product
- 30,000 total contacts in the database
Performance optimizations include:
- Custom SQL indexes for efficient querying
- Levenshtein✨ distance algorithm for fuzzy string matching
- SQL query optimization
- Composite indexes for frequently joined columns
These optimizations ensure responsive search performance even with large datasets.
