A full-stack web application that allows users to perform free-text searches by first name, last name, or SSN. Built as a coding assignment, this project utilizes React for the frontend and Flask for the backend.
- Search Functionality: Perform free-text searches by first name, last name, or SSN.
- Responsive Design: Ensures usability across various devices and screen sizes.
- RESTful API: Backend API built with Flask to handle search queries.
-
Frontend:
- React
- JavaScript
- HTML/CSS
-
Backend:
- Flask
- Python 3
- SQLite
User_Search_App/
├── backend/
│ ├── app.py
│ └── ... (other backend files)
├── frontend_react/
│ ├── public/
│ └── src/
│ ├── components/
│ ├── App.js
│ └── index.js
├── README.md
└── requirements.txt
- Node.js and npm installed
- Python 3 installed
- Git installed
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On macOS/Linux:
source venv/bin/activate - On Windows:
venv\Scripts\activate
- On macOS/Linux:
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
The backend server will start on
http://localhost:5000.
-
Navigate to the frontend directory:
cd frontend_react -
Install the required packages:
npm install
-
Start the React application:
npm start
The frontend will be accessible at
http://localhost:3000.
-
Access the application: Open your browser and navigate to
http://localhost:3000. -
Perform a search:
- Enter a first name, last name, or SSN into the search bar.
- Click the "Search" button to view matching results.
GET /api/search?query=<search_term>: Retrieve users matching the search term.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/YourFeature
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.