- Introduction to CodeMemory
CodeMemory is an AI-powered platform that helps developers understand their GitHub repositories and remember important information about their projects.
It allows developers to interact with their code using AI and access previously stored information.
Our project uses GitHub integration, backend services, and memory management to make software development easier.

- My Role in the Project
My main role in CodeMemory was Backend API Development.
I worked with Python and FastAPI to create and configure APIs.
My main responsibility was to connect the frontend and backend so that both could communicate properly.
My work included:
- Creating API routes using FastAPI.
- Handling frontend requests.
- Sending responses from the backend.
- Using Pydantic for data validation.
- Connecting APIs with backend services.
- Working with chat and memory-related APIs.
- Testing APIs using Swagger UI.
- Fixing errors in the backend.
- Updating code in GitHub.
- Backend Structure
The backend contains different files and folders. Each one has a separate responsibility.
- chat.py: Handles chat-related requests.
- health.py: Checks whether the backend is working.
- memory.py: Handles memory operations.
- repository.py: Handles repository-related operations.
- agents: Contains the agent orchestration functionality.
- dependencies.py: Provides the required backend services.
- schemas: Defines the structure of requests and responses.
This structure helps us organize the code properly.
- API Development Using FastAPI
I used FastAPI, a Python framework, to create APIs.
An API helps the frontend and backend communicate with each other.
A simple example of creating an API is:
from fastapi import APIRouter
router = APIRouter(
prefix="/chat",
tags=["Chat"]
)
@router.post("/")
async def chat():
return {"message": "Chat API is working"}
Here, "APIRouter" is used to create an API route, and "POST" is used to send information to the backend.
In our project, the chat API connects with the actual backend processing components.
- How Frontend and Backend Communicate
This was one of the main parts of my work.
The frontend and backend communicate using APIs.
Frontend:
- Displays the website.
- Takes input from the user.
- Shows the results.
Backend:
- Receives user input.
- Processes the information.
- Communicates with other services.
- Sends the result back.
Simple working process
- The user enters a question in the CodeMemory chat.
- The frontend sends the question to the backend.
- The request reaches the FastAPI endpoint.
- The backend checks the input using Pydantic.
- The backend processes the question using the required services.
- The backend prepares a response.
- The response is sent back to the frontend.
- The frontend displays the answer to the user.
Example
Suppose a user enters:
"Explain this GitHub repository."
The frontend sends the following data to the backend:
{
"repository_id": "owner/repository",
"question": "Explain this GitHub repository"
}
The backend receives this information through the chat API, processes the request, and returns a response.
The frontend then displays the answer.
My responsibility was to develop and configure the APIs that make this communication possible.
- How API Requests and Responses Work
A request is the information sent from the frontend to the backend.
A response is the information sent back from the backend to the frontend.
Some common HTTP methods are:
- GET: To receive information.
- POST: To send information.
- PUT: To update information.
- DELETE: To delete information.
In our project, the chat functionality uses a POST request to send the user's question to the backend.
The backend processes the request and returns the result in JSON format.
- Important APIs in CodeMemory
Some important API endpoints in our project are:
API Endpoint| Purpose
POST /api/chat| Handles chat requests
POST /api/memory/retain| Stores information
POST /api/memory/recall| Retrieves stored information
POST /api/memory/reflect| Generates reflections
Health endpoint| Checks backend status
These APIs help different parts of CodeMemory perform their tasks.
- Testing APIs Using Swagger UI
After developing the APIs, I tested them using Swagger UI.
Swagger UI provides a simple interface to test APIs.
We can open it using:
Using Swagger UI, I was able to:
- View all API endpoints.
- Enter sample input.
- Execute API requests.
- Check the responses.
- Find errors during testing.
This helped me check whether the backend APIs were working correctly.
Project screenshots to include:
- Screenshot of "chat.py" in VS Code.
- Screenshot of the "main.py" file.
- Screenshot of Swagger UI showing the API endpoints.
Screenshot of chat API testing.
Challenges Faced
During development, I faced some challenges.
Import Errors: Some Python modules were not importing correctly. I checked the folder structure and corrected the import paths.
Request Handling: I learned how to receive information from the frontend and validate it using Pydantic.
Backend Connection: Connecting API routes with the required backend services required proper understanding of the project structure.
API Testing: Some API requests returned errors. I used the terminal and Swagger UI to identify and fix the problems.
These challenges helped me understand backend development better.
- Technologies Used
- Python – Programming language.
- FastAPI – Creating backend APIs.
- Pydantic – Validating data.
- Uvicorn – Running the backend server.
- Swagger UI – Testing APIs.
- VS Code – Writing and debugging code.
- Git and GitHub – Managing and updating project code.
- GitHub Contribution
We used GitHub to store and manage our project code.
I updated my backend changes in the repository and used pull requests to contribute my work to the project.
This helped me understand how team members collaborate on software projects.
GitHub Repository:
https://github.com/MounaShreeK/CodeMemory
- What I Learned
Through this project, I learned:
- How APIs work.
- How to create APIs using FastAPI.
- How frontend and backend communicate.
- How HTTP requests and responses work.
- How to use JSON data.
- How to validate data using Pydantic.
- How to test APIs using Swagger UI.
- How to fix backend errors.
- How to use GitHub for teamwork.
- Conclusion
Working on CodeMemory helped me gain practical experience in backend development.
My main contribution was developing APIs using Python and FastAPI.
I learned how to create API routes, handle requests and responses, connect backend services, and test APIs using Swagger UI.
I also understood how APIs connect the frontend and backend and allow them to work together.
Overall, this project improved my technical knowledge and gave me practical experience in software development.
Project: CodeMemory
My Role: Backend API Development and Frontend–Backend Communication
Author: Abhishek S






