This project is a FastAPI application leveraging the power of the Gemini's Generative AI API that allows users to upload a project folder (in ZIP format) for code and README analysis. The application evaluates the quality of the code, generates improved code suggestions, and assesses the quality of the README documentation. The results are presented through a web interface, making it easy for developers to understand the strengths and weaknesses of their projects.
- Requirements
- Installation
- Usage
- Code Analysis
- README Analysis
- Contributing
- Contact
- Webapp Screenshots
- Python: Version 3.8 or higher
- FastAPI: Web framework for building APIs
- Uvicorn: ASGI server for running the FastAPI application
- Gemini API : Gemini's Generative AI API for code & documentation analysis
-
Clone the Repository
Open your terminal and clone the repository:
git clone https://github.com/anou1234/Fastapi_code_docu_analyzer.git cd my_fastapi_project
-
Set up a Virtual Environment
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies
Use
pip
to install the required packages:pip install -r requirements.txt
-
Start the Application
Run the FastAPI application using Uvicorn:
uvicorn main:app --reload
-
Access the Application
Open your web browser and navigate to:
http://127.0.0.1:8000
-
Upload a Project Folder
Use the web interface to upload a ZIP file containing the project you wish to analyze.
The application analyzes the submitted code for various quality metrics, including but not limited to:
- Code Complexity: Evaluates the complexity of the code to ensure maintainability.
- Readability: Checks the readability and structure of the code.
- Improved Code Suggestions: Provides suggestions for improved code practices and patterns.
The application also evaluates the README documentation to ensure it is informative and well-structured. The analysis includes:
- Clarity of project overview
- Proper usage instructions
- Dependencies and installation steps
- Contribution guidelines
Contributions are welcome! If you'd like to help improve this project, please follow these steps:
- Fork the Repository: Create your copy of the repository on GitHub.
- Create a Branch: Work on your feature or fix:
- Commit Your Changes: Keep your commits clear and concise.
- Push to Your Branch:
- Submit a Pull Request: Share your changes with the main project.
- Author: Anoushka Srivastava
- Email: anoushkathegreat28@gmail.com/anoushka.srivastava.21cse@bmu.edu.in
- GitHub: anou1234