Skip to content

Rajkumar-Sony/Drive-Microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

424 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Drive Microservice

A production-grade cloud drive management platform built with microservice architecture.

Java Spring Boot Spring Cloud License

Overview

Cloud Drive Microservice is a distributed backend platform for file storage, synchronization, and management. It follows domain-driven design principles with event-driven integration, centralized configuration, service discovery, and a unified API gateway.

Architecture

┌─────────────┐     ┌──────────────┐     ┌───────────────────┐
│   Frontend   │────▶│  API Gateway │────▶│   Auth Service    │
│  (Next.js)   │     │   (:8080)    │     │     (:8081)       │
└─────────────┘     └──────┬───────┘     └───────────────────┘
                           │
              ┌────────────┼────────────────┐
              ▼            ▼                ▼
      ┌──────────┐  ┌───────────┐   ┌─────────────┐
      │   User   │  │   File    │   │   Account   │
      │ Service  │  │  Service  │   │   Service   │
      └──────────┘  └───────────┘   └─────────────┘
              │            │                │
              ▼            ▼                ▼
      ┌──────────────────────────────────────────┐
      │              Kafka Event Bus             │
      └──────────────────────────────────────────┘
              │            │                │
              ▼            ▼                ▼
      ┌──────────┐  ┌───────────┐   ┌─────────────┐
      │PostgreSQL│  │  MongoDB  │   │    Redis     │
      └──────────┘  └───────────┘   └─────────────┘

Tech Stack

Category Technology
Language Java 21
Framework Spring Boot 3.5.x, Spring Cloud 2025.0.x
Frontend Next.js, React, TypeScript
Build Maven multi-module
Messaging Apache Kafka
Databases PostgreSQL, MongoDB, Redis
Auth Keycloak (OAuth2/OIDC)
Observability Zipkin, ELK Stack (Elasticsearch, Logstash, Kibana)
Monitoring Spring Boot Admin
Containerization Docker, Docker Compose

Services

Service Port Repository Description
Eureka Server 8761 platform-eureka-server Service discovery and registration
Config Server 8888 platform-config-server Centralized configuration management
Admin Server 9090 platform-admin-server Service health monitoring dashboard
API Gateway 8080 platform-api-gateway Routing, security, rate limiting
Auth Service 8081 platform-auth-service Authentication and authorization (Keycloak)
Config Repo platform-config-repo Shared configuration files
Docs platform-common-docs Reusable documentation and templates

Quick Start

Prerequisites: Java 21, Maven 3.9+, Docker 24+

# Step 1 — Clone with all submodules
git clone --recurse-submodules https://github.com/Rajkumar-Sony/Drive-Microservices.git
cd Drive-Microservices

# Step 2 — Validate the build
mvn -q -DskipTests clean validate

# Step 3 — Start infrastructure services
docker compose -f docker-compose.infra.yml up -d

# Step 4 — Build and run a service (example: eureka-server)
mvn -DskipTests clean package -pl eureka-server
mvn spring-boot:run -pl eureka-server

Infrastructure (Docker Compose)

docker compose -f docker-compose.infra.yml up -d
Service Port Purpose
PostgreSQL 5432 Relational data store
MongoDB 27017 Document data store
Redis 6379 Cache and session store
Kafka (KRaft) 9092 Event streaming
Kafka UI 8089 Kafka management dashboard
Keycloak 8180 Identity and access management
Zipkin 9411 Distributed tracing
Elasticsearch 9201 Log aggregation
Logstash 5000 Log pipeline
Kibana 5601 Log visualization
Vault 8200 Secret management
Mongo Express 8181 MongoDB admin UI

Documentation

Detailed documentation is maintained in the docs submodule:

Branch Naming Rule

  • Published version branches must use v0.0.<sequence> format (for example: v0.0.1, v0.0.104).
  • Version numbers must be assigned in commit date/time order: oldest commit gets the lowest number.
  • Non-canonical published names are prohibited (v0.0.<sequence>--<branch-name>, chained prefixes, zero-padded names like v0.0.001).
  • Normalize invalid names in safe mode: create the canonical target branch at the same SHA, verify target, then delete old branch name.

License

Copyright (c) 2026 Rajkumar Sony. All rights reserved.

This source code is proprietary and confidential. No part of this codebase may be reproduced, distributed, or transmitted in any form or by any means without the prior written permission of the author. See LICENSE for details.

Step-1: Install code-review-graph (if not already installed).

if ! command -v code-review-graph >/dev/null 2>&1; then
  /usr/local/bin/python3.12 -m pip install --user code-review-graph
  export PATH="$HOME/Library/Python/3.12/bin:$PATH"
fi

Step-2: Initialize graph support.

code-review-graph install
code-review-graph build

Step-3: (Optional) install platform-specific MCP integration.

code-review-graph install --platform claude-code
code-review-graph install --platform cursor

Step-4: Run this before AI-assisted coding/review sessions.

code-review-graph update
code-review-graph status
code-review-graph detect-changes

Step-5: Follow the usage rule.

  • During AI-assisted code generation/review, run code-review-graph update and code-review-graph detect-changes before broad codebase reads.

Repository-specific notes:

  • Excludes for generated/build artifacts are in .code-review-graphignore.
  • Local graph database/cache is stored in .code-review-graph/ and is git-ignored.
  • Full team onboarding instructions are documented in CODE_REVIEW_GRAPH.md.
  • This root repo uses submodules; run code-review-graph build/update/detect-changes inside the target service submodule when generating code for that service.

Documentation

  • Documentation repository is mapped as submodule at docs/ (repo: platform-common-docs).
  • Reusable docs framework entry: docs/README.md
  • New project onboarding checklist: docs/CHECKLIST_NEW_PROJECT.md
  • Project-specific docs layer: docs/projects/<project-key>/
  • Templates for new projects: docs/templates/
  • One-command bootstrap script: docs/scripts/bootstrap-project-docs.sh
  • Shared standards layer: docs/common/
  • Legacy/common planning: docs/planning.md
  • Legacy/common development kit: docs/development-kit.md
  • Legacy/common coding principles (mandatory, backend + frontend): docs/coding-principles.md
  • Legacy/common agent run state pattern: docs/agent-memory.md
  • Common diagram templates: docs/diagrams/common/
  • Project-specific diagrams in this root repo: diagrams/
  • AI review graph setup for this monorepo: CODE_REVIEW_GRAPH.md

Future Project Configuration (Copy-Paste Steps)

Step-1: Move to the root project and initialize docs submodule.

git submodule update --init --recursive docs
cd docs

Step-2: Generate project documentation in one command.

PROJECT_KEY="sample-project" \
PROJECT_NAME="Sample Project" \
ROOT_REPOSITORY_URL="https://github.com/<org>/<repo>.git" \
OWNER="platform-team" \
VERSION="v0.0.1" \
NEXT_VERSION="v0.0.2" \
./scripts/bootstrap-project-docs.sh

Step-3: Configure AI graph context for repositories used in coding.

cd ..
if ! command -v code-review-graph >/dev/null 2>&1; then
  /usr/local/bin/python3.12 -m pip install --user code-review-graph
  export PATH="$HOME/Library/Python/3.12/bin:$PATH"
fi

for repo in . auth-service api-gateway admin-server config-server eureka-server config-repo; do
  [ -d "$repo" ] || continue
  (
    cd "$repo"
    code-review-graph install
    code-review-graph build
    code-review-graph update
    code-review-graph detect-changes
  )
done

Step-4: Use prompt instructions from docs/prompt.md (Super-prompt) for implementation runs.

Shared Config Repository

  • config-repo/ is mapped as a submodule and can be reused in other root projects in the same way as service repositories.
  • Repository: https://github.com/Rajkumar-Sony/platform-config-repo

Reusable Service Repository Naming

To keep shared services reusable across multiple root projects, use non-project-specific repository names.

  • Pattern: <platform-scope>-<service-name>
  • Example repositories:
    • platform-eureka-server
    • platform-config-server
    • platform-admin-server
    • platform-api-gateway
    • platform-auth-service

Avoid naming service repositories with a specific product/root repo prefix (for example drive-microservice-*) when the service is intended to be reused by other projects.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors