# Summarize AI Mobile
Mobile app for AI-powered document summarization. Summarize articles, PDFs, and research papers quickly and efficiently on the go.
## Key Features
* **AI-Powered Summarization:** Leverages advanced AI algorithms to generate concise and accurate summaries of various document types.
* **Document Upload:** Allows users to upload documents directly from their mobile devices (e.g., PDFs, text files).
* **URL Input:** Enables summarization of articles and web content by simply providing a URL.
* **Multiple Document Types:** Supports summarizing articles, PDFs, research papers, and other text-based documents.
* **Customizable Summary Length:** Provides options to adjust the length and level of detail in the generated summaries.
* **Offline Access:** Allows users to access previously generated summaries even without an internet connection (depending on caching implementation).
* **User-Friendly Interface:** Offers a clean and intuitive mobile interface for a seamless user experience.
* **History Tracking:** Keeps a record of previously summarized documents for easy access and review.
## Tech Stack
* **Frontend:** React (with TypeScript and Tailwind CSS) - Responsible for the mobile application's user interface and interactions.
* **Backend:** Laravel (PHP) - Provides the API endpoints for document processing, summarization, and user authentication.
* **Language:** TypeScript
* **Styling:** Tailwind CSS
## Prerequisites
Before you begin, ensure you have the following installed:
* **Node.js:** (version 16 or higher) - Required for running the React frontend. Download from [https://nodejs.org/](https://nodejs.org/)
* **npm** or **yarn:** Package managers for JavaScript dependencies. npm is included with Node.js.
* **PHP:** (version 8.0 or higher) - Required for running the Laravel backend.
* **Composer:** PHP dependency manager. Install from [https://getcomposer.org/](https://getcomposer.org/)
* **MySQL or other compatible database:** Used by the Laravel backend for data storage.
* **Git:** For version control.
* **Emulator or physical mobile device:** For testing the React Native app
## Installation Instructions
Follow these steps to install and set up the project:
**1. Clone the repository:**
```bash
git clone <repository_url>
cd summarize-ai-mobile2. Backend Setup (Laravel):
cd backend
composer install
cp .env.example .env
# Configure your .env file with database credentials, app URL, and other necessary settings
php artisan key:generate
php artisan migrate
php artisan db:seed # Optional: Seed the database with initial data
php artisan serve3. Frontend Setup (React):
cd ../frontend # Go back to the project root and then into the frontend directory
npm install # or yarn install1. Backend Development:
- Navigate to the
backenddirectory. - Use your preferred IDE (e.g., VS Code, PHPStorm) to edit the Laravel code.
- Start the Laravel development server:
php artisan serve - Access the backend API endpoints at the address specified by
php artisan serve(usuallyhttp://127.0.0.1:8000).
2. Frontend Development:
- Navigate to the
frontenddirectory. - Use your preferred IDE (e.g., VS Code) to edit the React Native code.
- Start the React Native development server:
npm startoryarn start - Follow the instructions provided by the React Native CLI to run the app on an emulator or physical device. This usually involves installing
expo-cliglobally and runningexpo start.
1. Summarizing a Document via API:
Send a POST request to the /api/summarize endpoint with the document text or URL in the request body. Example (using curl):
curl -X POST \
http://127.0.0.1:8000/api/summarize \
-H 'Content-Type: application/json' \
-d '{
"text": "This is a long article that needs to be summarized.",
"length": "short" // Optional: "short", "medium", "long"
}'The API will return a JSON response containing the summarized text.
2. Using the Mobile App:
- Open the Summarize AI Mobile app on your device.
- Select the desired input method: "Upload Document" or "Enter URL".
- If uploading a document, choose the file from your device's storage.
- If entering a URL, paste the URL of the article or web page.
- Optionally, adjust the summary length setting.
- Tap the "Summarize" button.
- The app will display the generated summary.
The backend API follows a RESTful architecture. Key endpoints include:
-
POST /api/summarize:- Description: Summarizes the provided text or content from a URL.
- Request Body:
text(string, optional): The text to summarize. Mutually exclusive withurl.url(string, optional): The URL of the page to summarize. Mutually exclusive withtext.length(string, optional): Desired summary length ("short", "medium", "long"). Defaults to "medium".
- Response:
summary(string): The generated summary.
-
GET /api/history:- Description: Retrieves the user's summary history. Requires authentication. (Authentication implementation details not included in this example, but would involve JWT or similar.)
- Response:
history(array): An array of summary objects, each containing details like the original text/URL, summary, and timestamp.
-
Authentication Endpoints (example): (Implementation details not included, but this outlines potential endpoints)
POST /api/register: Register a new user.POST /api/login: Log in an existing user and obtain an authentication token.POST /api/logout: Log out the current user and invalidate the authentication token.
More detailed API documentation (e.g., using Swagger/OpenAPI) should be generated as the API evolves.
We welcome contributions to the Summarize AI Mobile project! Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name - Make your changes and ensure they are well-documented and tested.
- Commit your changes with descriptive commit messages.
- Push your branch to your forked repository:
git push origin feature/your-feature-name - Create a pull request to the
mainbranch of the original repository.
Please be respectful of other contributors and follow the project's code style.
This project is licensed under the MIT License - see the LICENSE file for details.