FeedLoop is a full-stack feedback management platform for teams, enabling managers and employees to exchange, request, and track feedback efficiently. It includes:
- FastAPI backend
- React frontend
- Dockerized setup for local development
- Install Dependencies
cd backend
pip install -r requirements.txt- Configure Environment Variables
Create a .env file inside the backend/ directory:
MONGO_URI=mongodb://localhost:27017
DATABASE_NAME=feedback_db
SECRET_KEY=your_secret
- Run the Backend Server
uvicorn app.main:app --reload- Initial Setup (Before Using Frontend)
Use Swagger UI or tools like Postman/Thunder Client:
-
Open API Docs
- Visit: http://localhost:8000/docs
-
Register an Admin
- Endpoint: POST /user/register
- Sample Payload:
{
"name": "ADMIN",
"email": "[email protected]",
"password": "admin123",
"role": "admin"
}-
Bulk Register Users
- Endpoint: POST /user/bulk-register?admin_email=[email protected]
- Sample Payload:
[
{
"name": "Steve Rogers",
"email": "[email protected]",
"password": "avengers123",
"role": "manager"
},
{
"name": "Tony Stark",
"email": "[email protected]",
"password": "avengers123",
"role": "manager"
},
{
"name": "Natasha Romanoff",
"email": "[email protected]",
"password": "avengers123",
"role": "employee"
}
]-
Create a Team
- Endpoint: POST /team/create?admin_email=[email protected]
- Sample Payload:
{
"manager_email": "[email protected]",
"member_emails": ["[email protected]"]
}- Install Dependencies
cd frontend
npm install- Start the Frontend
npm startApp will run at: http://localhost:3000
cd backend
docker build .
docker compose upFROM python:3
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY app /code/app
COPY .env /code/.env
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]This project uses Docker Compose to manage:
- Image: mongo
- Container Name: feedback_mongo
- Ports: 27017:27017
- Command: mongod --noauth (for development only)
- Volumes: mongo_data:/data/db
- Builds the image from Dockerfile
- Container Name: feedback_backend
- Ports: 8000:8000
- Environment Variables:
MONGO_URI=mongodb://mongo:27017
DATABASE_NAME=feedback_db
- Depends on: mongo (ensures MongoDB starts first)
volumes:
mongo_data:- FastAPI
- MongoDB with Beanie ODM
- Pydantic
- Uvicorn
- CORS for cross-origin requests
- React (CRA)
- Tailwind CSS
- Context API
- Fetch API
- Roles: admin, manager, employee
- Supports anonymous and named feedback
- Managers get analytics and feedback dashboards
- Employees can request and acknowledge feedback
- Modular API structure: /user, /team, /feedback, /dashboard
class UserDB(Document):
name: str
email: EmailStr
password_hashed: str
role: Literal["manager", "employee", "admin"]class TeamDB(Document):
manager_email: EmailStr
member_emails: List[EmailStr]
created_at: datetime
updated_at: datetimeclass FeedbackDB(Document):
created_by_email: str
created_by_role: str
is_anon: bool
employee_email: str
strengths: str
areas_to_improve: str
sentiment: Optional[Literal["positive", "negative", "neutral"]]
tags: Optional[List[str]]
status: Literal["requested", "draft", "submitted", "acknowledged"]
requested_at: Optional[datetime]
created_at: Optional[datetime]
updated_at: Optional[datetime]
acknowledged_at: Optional[datetime]Minimal use of AI tools (like ChatGPT) was made for:
- Refining documentation
- Clarifying code structure
- Improving naming consistency