Introduction to Secrin
“Why did we implement this logic three years ago?” It is a question that haunts every developer. Usually, the answer is lost in a sea of closed PRs, Slack threads, and forgotten Jira tickets. Secrin is an emerging open-source tool designed to act as the “tribal memory” for your engineering team.
Unlike standard code search tools that just match keywords, Secrin builds a semantic Knowledge Graph that links your code to the context surrounding it. It connects commits to issues, documentation to implementation, and authors to decisions. By leveraging Vector Embeddings and Graph Databases (Neo4j), it empowers developers to ask natural language questions and get answers that understand the full history of the codebase.
Key Features
Secrin distinguishes itself by focusing on the relationships between data points rather than just the data itself:
- Unified Knowledge Ingestion: Connects to GitHub repositories, Jira boards, and documentation platforms to create a single source of truth.
- Graph-Based RAG: Uses Retrieval-Augmented Generation backed by a Neo4j knowledge graph to provide answers with high accuracy and deep context.
- Platform Integration: Designed to live where you work, with planned integrations for Slack bots and GitHub comments to answer questions directly in your workflow.
- Data Privacy: As a self-hosted solution, your proprietary code and internal discussions remain within your infrastructure, suitable for security-conscious teams.
- Contextual History: specifically captures design decisions and architectural reasoning, preserving the “why” alongside the “how.”
Installation Guide
Secrin is built with a modern Python stack and utilizes Docker for managing its database dependencies.
Prerequisites
You will need Docker and Docker Compose installed to run the Neo4j and Vector database services. For the application logic, ensure you have Python 3.10+ and Poetry for dependency management.
Step 1: Clone the Repository
git clone https://github.com/SecrinLabs/secrin.gitncd secrinStep 2: Environment Setup
Copy the example environment file and configure your API keys (e.g., OpenAI for embeddings) and database credentials:
cp .env.example .envStep 3: Install Dependencies
Use the provided setup script or Poetry to install the necessary Python packages:
poetry installn# OR run the helper scriptnpython scripts/setup.pyStep 4: Start Services
Launch the backend services using Docker Compose (check the `docker-compose.yml` if available or run the database containers manually as described in the docs):
docker-compose up -dHow to Use Secrin
Once running, Secrin operates as a background service that continuously indexes your connected sources.
Connecting a Repository
Navigate to the configuration panel (or use the CLI/API) to add a GitHub repository URL. Secrin will begin parsing the commit history, PR descriptions, and code files to populate the knowledge graph.
Asking Questions
You can interact with Secrin through its chat interface. For example, you might ask:
- “Who introduced the authentication middleware, and what issue was it solving?”
- “Where is the documentation for the payment gateway integration?”
The system will traverse the graph, find the relevant commit that linked to a Jira ticket about “Security Compliance,” and return a summarized answer citing the specific author and date.
Contribution Guide
Secrin is in active development and welcomes community involvement, especially given its early stage.
Ways to Contribute
- Add Integrations: The team is looking for connectors to other tools like Linear, Trello, or Confluence.
- Improve the Graph Schema: Help refine how relationships are defined in Neo4j to make retrieval even smarter.
- Frontend Development: Contribute to the dashboard or chat interface components in the `apps/` directory.
Check the CONTRIBUTING.md file in the root directory for coding standards and pull request templates.
Community & Support
As a budding open-source project, the community is just forming, making it a great time to get involved.
- GitHub Issues: The primary channel for bug reports and feature requests.
- Project Roadmap: Follow the repository to see upcoming features like IDE extensions or advanced analytics.
Conclusion
Secrin addresses a critical pain point in modern software development: knowledge loss. By automating the documentation of relationships between code and context, it frees developers from being human encyclopedias. If your team struggles with onboarding new hires or remembering why legacy code exists, Secrin offers a promising, automated solution to keep your institutional memory alive.
Useful Resources
- GitHub Repository: Source code and documentation.
- Neo4j: The graph database technology powering Secrin.
- Poetry: The dependency manager used in the project.
Frequently Asked Questions
Is Secrin the same as GitHub Copilot?
No. Copilot is an AI coding assistant that helps you write code in real-time. Secrin is a knowledge assistant that helps you understand the context, history, and reasoning behind the code. They are complementary tools.
Can I run Secrin completely offline?
Yes, Secrin is designed to be self-hosted. While it may default to using OpenAI’s API for generating embeddings and answers, you can configure it to use local LLMs (like Llama 3 via Ollama) to keep all data entirely within your private network.
What databases do I need to run it?
Secrin relies on a Graph Database (specifically Neo4j) to store the relationships between your data entities, and a Vector Database (like Chroma or Qdrant) to store the semantic embeddings of your text for searchability.
Is it free to use?
Yes, the core software is open-source under the AGPL-3.0 License. You can download, modify, and run it for free, though you are responsible for any infrastructure costs or API fees associated with the LLMs you choose to use.
