Skip to content

Commit e395ebf

Browse files
committed
README file added
1 parent 455b9b4 commit e395ebf

File tree

5 files changed

+67
-25
lines changed

5 files changed

+67
-25
lines changed

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,69 @@
1-
# AI-Assistant
2-
AI Assistant for understanding rocket chats core repository
1+
# Rocket Chatter App
2+
3+
Rocket Chatter App is an open-source AI-powered assistant designed to help developers understand and navigate the complex codebase of Rocket.Chat, a leading open-source team communication platform. By leveraging advanced techniques like Language Models (LMs), Retrieval Augmented Generation (RAG) pipelines, and a graph database, the app provides accurate and contextual information to developers, streamlining the development process and enhancing collaboration within the Rocket.Chat community.
4+
5+
## Features
6+
7+
### Codebase Comprehension Assistance
8+
9+
- **Ask Questions**: Developers can ask specific code-related questions, and the app will provide detailed explanations by automatically setting the context and tracing back to related entities and dependencies. For example, a developer can ask, "What does the `allocUnsafe` method do and how does it achieve its goals?" and the app will provide a comprehensive explanation, including its dependencies and interactions with other parts of the codebase.
10+
11+
- **Generate Diagrams**: The app can generate visual representations of the codebase's structure and relationships, aiding developers in understanding the architecture and dependencies. Developers can request diagrams for specific entities or the entire codebase, and the app will generate diagrams using popular formats like Mermaid or PlantUML.
12+
13+
- **Extract Documentation**: Developers can request documentation for specific entities within the codebase, and the app will generate comprehensive documentation in various formats, including JSDoc for TypeScript and JavaScript codebases, and plain English for non-technical stakeholders. The documentation will include descriptions, usage examples, and relevant code snippets.
14+
15+
### Code Enhancement and Best Practices
16+
17+
- **Find Similar Code**: The app can search the codebase for similar code snippets, helping developers learn from existing implementations, identify patterns, and avoid duplication. Developers can provide a code snippet, and the app will find similar code across the project, facilitating code reuse and consistency.
18+
19+
- **Assess Code Importance**: The app can evaluate the criticality and centrality of code entities, providing insights into their impact and dependencies, which is crucial for tasks like refactoring or introducing new features. The app will generate scores for criticality (how many other parts of the code depend on this entity), centrality (how connected this entity is to other parts), and overall importance, helping developers prioritize their efforts.
20+
21+
- **Enforce Style Guides**: The app can automatically check the codebase against predefined style guides and coding standards, ensuring code quality, consistency, and readability across the project. Developers can provide code snippets, and the app will suggest improvements based on the project's style guide, promoting best practices and maintainability.
22+
23+
- **Suggest Improvements**: The app can analyze code snippets and offer targeted refactoring suggestions, such as renaming variables, extracting code into reusable functions, removing dead code, and optimizing performance. These suggestions will help developers write cleaner, more efficient, and maintainable code while adhering to the project's coding standards.
24+
25+
### Accessibility and Collaboration
26+
27+
- **Translate Code**: The app supports code translation between different programming languages, facilitating collaboration and knowledge sharing across diverse development environments. Developers can provide code snippets in one language, and the app will translate them to another language while preserving the context and functionality.
28+
29+
- **Explain Code Usage**: The app can provide clear reasoning and explanations about why specific code entities are used, their importance, and the potential consequences of modifying or removing them. This feature helps developers make informed decisions during development, maintenance, and refactoring tasks.
30+
31+
- **Integrate Documentation**: The app can integrate external documentation, tutorials, or resources directly into the development environment, providing developers with contextually relevant information within the codebase. This feature reduces context switching and improves productivity by keeping developers focused on the code while having access to relevant documentation.
332

433
## Getting Started
5-
Now that you have generated a blank default Rocket.Chat App, what are you supposed to do next?
6-
Start developing! Open up your favorite editor, our recommended one is Visual Studio code,
7-
and start working on your App. Once you have something ready to test, you can either
8-
package it up and manually deploy it to your test instance or you can use the CLI to do so.
9-
Here are some commands to get started:
10-
- `rc-apps package`: this command will generate a packaged app file (zip) which can be installed **if** it compiles with TypeScript
11-
- `rc-apps deploy`: this will do what `package` does but will then ask you for your server url, username, and password to deploy it for you
12-
13-
## Documentation
14-
Here are some links to examples and documentation:
15-
- [Rocket.Chat Apps TypeScript Definitions Documentation](https://rocketchat.github.io/Rocket.Chat.Apps-engine/)
16-
- [Rocket.Chat Apps TypeScript Definitions Repository](https://github.com/RocketChat/Rocket.Chat.Apps-engine)
17-
- [Example Rocket.Chat Apps](https://github.com/graywolf336/RocketChatApps)
18-
- Community Forums
19-
- [App Requests](https://forums.rocket.chat/c/rocket-chat-apps/requests)
20-
- [App Guides](https://forums.rocket.chat/c/rocket-chat-apps/guides)
21-
- [Top View of Both Categories](https://forums.rocket.chat/c/rocket-chat-apps)
22-
- [#rocketchat-apps on Open.Rocket.Chat](https://open.rocket.chat/channel/rocketchat-apps)
34+
35+
### Prerequisites
36+
37+
- Node.js (version 14.x or higher)
38+
- npm (version 6.x or higher)
39+
- Neo4j (version 5.x or higher)
40+
41+
### Installation
42+
43+
1. Clone the repository: `git clone https://github.com/RocketChat/Apps.AI.Codebase.Assistant`
44+
2. Navigate to the project directory: `cd rocket-chatter-app`
45+
3. Install dependencies: `npm install` or `bun install`
46+
4. Set up the required environment variables (e.g., database credentials, API keys) by creating a `.env` file based on the provided `.env.example` file.
47+
5. Build the project: `npm run build`
48+
6. Start the application: `npm start`
49+
50+
### Usage
51+
52+
Once the application is running, you can access the Rocket Chatter App through the Rocket.Chat interface. The app provides various slash commands (e.g., `/rcc-ask`, `/rcc-diagram`, `/rcc-document`) that you can use to interact with the assistant.
53+
54+
## Architecture
55+
56+
The Rocket Chatter App follows a modular architecture with the following main components:
57+
58+
1. **Rocket Chat Application**: A user-friendly interface for developers to interact with the system, enabling them to ask questions, request diagrams, and access documentation directly within the Rocket.Chat environment. The application is built using the Rocket.Chat App Engine SDK and is deployed as a Rocket.Chat App. ![Rocket Chatter App](./docs/images/architecture-rc-app.png)
59+
2. **Ingestion Server**: Responsible for parsing the Rocket.Chat codebase, extracting relevant information, and storing it in the Neo4j graph database. It utilizes compiler APIs like `ts-morph` and `jscodeshift` to handle TypeScript and JavaScript code constructs. The ingestion process involves chunking the codebase, generating embeddings for code entities, and establishing relationships between them in the graph database. ![Rocket Chatter App](./docs/images/architecture-ingestion-server.png)
60+
3. **Application Server**: A middleware component built with Express.js that serves as a bridge between the database and the client application. It handles requests from the Rocket Chat App, queries the Neo4j database using cosine similarity-based searches, and generates responses using Language Models (LMs). The server employs a Retrieval Augmented Generation (RAG) pipeline to provide contextual and accurate information to developers. ![Rocket Chatter App](./docs/images/architecture-application-server.png)
61+
62+
63+
### Development Environment Setup
64+
65+
1. Fork the repository and clone your fork: `git clone https://github.com/your-username/rocket-chatter-app.git`
66+
2. Navigate to the project directory: `cd rocket-chatter-app`
67+
3. Install dependencies: `npm install`
68+
4. Set up the required environment variables (e.g., database credentials, API keys) by creating a `.env` file based on the provided `.env.example` file.
69+
5. Start the development server: `npm run dev`
661 KB
Loading
807 KB
Loading
492 KB
Loading

0 commit comments

Comments
 (0)