Skip to content

Secure, scalable chat app built on principles of quality & value. Your digital asset for effective communication.

Notifications You must be signed in to change notification settings

Induktr/BrainMessenger

Repository files navigation

BrainMessenger - Your Digital Asset for Effective Communication

Introduction: Building a System of Value

Welcome to the BrainMessenger repository. This is not just another messenger. It is a purposeful project aimed at creating a reliable, scalable, and secure SYSTEM (Principle 9) that will become a key digital ASSET (Principle 10) for every user. Our main goal is to simplify complexity (Margulan Seisembayev's principle), providing intuitive and powerful tools for effective communication and interaction in the modern digital world.

BrainMessenger is built upon a strong foundation (Principle 8) of deep principles, conscious planning, and continuous learning (Principle 1). Every line of code, every decision made – this is a long-term investment (Principle 8) in the quality (Principle 3) and value (Principle 2) of our product.

Vision and Mission: Our Long-Term View

Our Vision: To create a leading digital asset for communication that helps millions of users worldwide effectively exchange information, build communities, and achieve their goals.

Our Mission: To simplify complex interaction by providing a reliable, secure, and user-friendly messenger built on principles of quality, transparency, and continuous improvement.

Key Principles: The Foundation of Our System

Our actions and decisions are guided by a set of key principles that serve as the foundation (Principle 8) of the entire BrainMessenger project. These are not just words, but personal algorithms and standards (Kaizen, Principle 9), developed through experience and reflection (Principle 1):

  • Continuous Learning and Growth (Principle 1): The process of creating BrainMessenger is a proving ground for deep learning in technology, architecture, and user psychology. We learn at every step, turning mistakes into lessons.
  • Creating Value (Principle 2): The user's benefit is at the core of everything. We build something that genuinely solves problems and makes life better.
  • Quality Over Quantity (Principle 3): We strive to do things well, not just quickly. Reliability, thoughtfulness, and attention to detail are our priorities.
  • Mindfulness and Presence (Principle 4): Being attentive to the process, users, and the team.
  • Health as a Foundation (Principle 5): The physical and mental well-being of the team (and future users) is the basis for productivity and sustainability.
  • Responsibility and Proactivity (Principle 6): We take responsibility for the outcome and act preemptively.
  • Integrity (Principle 7): Our words align with our actions.
  • Long-term Thinking (Principle 8): We invest time and effort with a view to the future.
  • System and Optimization (Principle 9): We build processes and architecture as a system, constantly seeking ways to increase efficiency (Kaizen).
  • Creating Wealth > Earning Money (Principle 10): Focusing on creating an ASSET (BrainMessenger) that brings value and works in the long term.
  • Flexibility and Adaptability (Principle 11): Willingness to change tactics and tools while maintaining the vision.
  • Pragmatism and Realism (Principle 12): Making decisions based on real data and capabilities.
  • Persistence (Principle 13): Not giving up in the face of difficulties, extracting lessons from failures.
  • Using External Expertise and Feedback (Principle 14): We learn from others, listen to constructive criticism.
  • Bias for Action (Principle 15): In the early stages, it's more important to start doing and get feedback than to plan endlessly.

These principles, inspired by the philosophy of Margulan Seisembayev and the practices of leading IT companies, shape our culture and development approach.

About the BrainMessenger Project (MVP Focus)

Our current focus is on developing the Minimum Viable Product (MVP). The MVP is the first, pragmatic (Principle 12) step towards realizing our vision. We are building a solid technical foundation (Principle 8) that will allow us to develop the product quickly and efficiently in the future.

The MVP includes basic but high-quality and reliable (Principle 3) features that provide key value (Principle 2):

  • Basic Messaging: Sending and receiving text messages in personal chats and groups/channels.
  • File Sharing: Uploading and downloading files (with image optimization).
  • Channels and Groups: Basic creation of groups/channels, joining public channels, and reading content.
  • Basic Account Management: Registration, login/logout, profile editing (name, avatar), basic security settings.
  • Core UI Settings: Choosing the theme (Light/Dark), basic notification and language settings.
  • Basic Security: Data encryption (TLS, password hashing, basic measures against SQLi/XSS/DDoS), email confirmation during registration.
  • Adaptive UI: An interface adapted for mobile (Android, iOS) and web platforms.
  • Basic Multilingualism: Support for several interface languages (English, Russian, and others as per DocLocIn.md).

Functionality beyond the MVP (audio/video calls, advanced security/privacy features, premium subscription, full animation set, AI integrations) is planned for subsequent stages of the Roadmap.

How We Build: The Story of Creation and the Kaizen Process

The process of creating BrainMessenger is a living story, based on our principles. We build it systematically (Principle 9), step by step, documenting each stage and continuously seeking opportunities for improvement (Kaizen).

  1. Mindful Planning (Principle 4): The project began with a clear definition of global goals and their decomposition into achievable stages (Roadmap).
  2. Choosing the Foundation (Principle 8, 12): We carefully selected the technology stack – reliable and pragmatic tools (TypeScript, NestJS, React/RN, PostgreSQL/Neon, Cloudflare R2, Kafka, Redis) that form a solid technical foundation.
  3. Building the MVP Core: Implementation started with the basic, critical parts of the system (Authentication, Basic UI, Infrastructure, File Handling). We apply Bias for Action (Principle 15), focusing on building working components, even if they are minimal for now.
  4. Continuous Learning and Applying Knowledge (Principle 1): Every new task, especially related to learning or integrating technologies (as seen in the Video Tracker and tasks), is viewed as an opportunity for growth. We document this process through videos and reflection (Kaizen-Hour).
  5. Systemic Approach to Quality (Principle 3, 9): We integrate testing early in the development cycle (Unit tests), configure CI/CD pipelines for automated checks, and use monitoring (Prometheus, Grafana, Sentry) and logging (Winston, ELK) tools for continuous control over the system's health (Principle 5) in real time.
  6. Documentation as Part of the Knowledge System: The entire development process, architectural decisions, standards, and requirements are carefully documented. This is not just a formality, but part of creating a knowledge system that accelerates onboarding, simplifies support, and enables informed decision-making in the future.

We are building BrainMessenger as a living, evolving organism, constantly adapting and improving based on our principles and feedback from the development process and future users.

Technology Stack: Our Tools for Creating the Asset

We have chosen a stack that is pragmatic (Principle 12), reliable (Principle 3), and scalable (Principle 8) to create our digital ASSET.

  • Language: TypeScript - Static typing to enhance code quality and reliability.
  • Backend: Node.js, NestJS - Efficient and structured framework for server logic and GraphQL API.
  • Frontend: React, Next.js (Web), React Native (Mobile/Desktop) - Cross-platform UI development focusing on performance.
  • API: GraphQL - Flexible interaction between client and server.
  • Real-time: WebSockets - Instant message delivery.
  • Database: PostgreSQL (via Neon) - Reliable and scalable database. Neon as a managed service reduces operational overhead (Pragmatism).
  • ORM: Prisma - Type-safe and reliable database interaction, protection against SQL injection (Quality, Security).
  • Caching: Redis - High-performance caching and state management.
  • Queues: Kafka - Reliable asynchronous task processing.
  • File Storage: Cloudflare R2 - Object storage with favorable pricing and no egress fees (Pragmatism, ASSET).
  • Notifications: Firebase - Managed service for push notifications.
  • Email/2FA: Gmail API - Reliable delivery of transactional emails (Confirmation codes, 2FA).
  • Payments: Stripe, Cryptomus (Beyond MVP) - ASSET monetization, Pragmatism.
  • Testing: Jest, Cypress, Detox, k6, OWASP ZAP/Burp Suite (plan) - Comprehensive approach to ensuring quality.
  • Deployment: Vercel (Web), Docker, Kubernetes - Automated and scalable deployment.
  • Monitoring: Prometheus, Grafana, Sentry (plan) - System visibility and Kaizen analysis.

Architecture: The Evolution of the System

Currently, BrainMessenger is implemented as a monolithic application based on NestJS. This is a pragmatic (Principle 12) decision for the MVP, allowing us to quickly launch the product and validate core hypotheses.

In the future, as the project grows and the load increases, we plan a phased transition to a microservice architecture using the Strangler Pattern. This is a long-term strategy (Principle 8) that will enable independent scaling and development of individual components (chats, calls, AI, payments), increasing the system's overall reliability and flexibility (Principle 3, 11).

Interaction between components will be via GraphQL API (synchronously) and Kafka (asynchronously), using Apollo Federation (in the future) to build a unified API schema from multiple microservices.

Project Status: Current Stage (MVP)

At this time, the project is in the active development stage of the MVP (as per the MVP Requirements Instruction). We are focused on completing the core messaging functionality, file handling, group/channel creation, and basic settings, while simultaneously strengthening the technical foundation (Principle 8) and embedding continuous learning and Kaizen processes into our daily work.

Progress is documented through tasks, code in the repository, and video recordings that showcase our journey and the process of creation (Principle 1).

Getting Started (For Developers)

Want to join us in building this digital ASSET? Here's how to get started:

  1. Clone the repository:
    git clone <URL of your repository>
    cd BrainMessenger
  2. Install dependencies:
    npm install # Turborepo will install dependencies for all packages
  3. Set up environment variables: Copy .env.example to .env and fill in the necessary data for integrations (Neon, R2, Firebase, etc.). Do not commit your .env file!
    cp .env.example .env
    # Fill in .env
  4. Set up the database: Run a local PostgreSQL or use a Neon instance, then apply Prisma migrations.
    cd backend
    npx prisma migrate dev --name initial_setup # Or npx prisma migrate deploy for production
    cd ..
  5. Start services in development mode:
    turbo run dev # This will start backend and frontend dev servers
    # Or navigate to specific packages and run their dev scripts:
    # cd backend && npm run start:dev
    # cd packages/web && npm run dev
    # cd packages/mobile-desktop && npm run android / npm run windows

More detailed instructions on local setup and development can be found in the Development Guide.


Documentation: Our System of Knowledge

This README provides a high-level overview. All detailed information about the project is contained within our comprehensive system of documentation. Exploring these documents is part of the learning process (Principle 1) and understanding the system (Principle 9):

Contribution

We welcome contributions to the building of this digital ASSET! If you have ideas, suggestions, or want to help with the code, please refer to the Contribution Guide (if available).

Releases

No releases published

Packages

No packages published

Languages