8000 GitHub - solutionchallenge/ondaum-server: 2025 Google Solution Challenge Server Repository for Team Ondaum
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

solutionchallenge/ondaum-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ondaum Server

πŸ“… This README was written on May 15, 2025.

Go Google Gemini Google Login JWT MySQL Swagger Kubernetes GitHub Actions

🌍 OVERVIEW

HelloπŸ‘‹ This is team Ondaum. Ondaum is a pure Korean word, meaning 'a warm and genuine self'.

We want to help people around the world live healthier lives by being with Um, an AI professional psychological counseling companion, anytime and anywhere.

Let's start on https://ondaum.revimal.me/

πŸ›  SKILLS

Architecture & Design

  • Architecture Pattern: Vertical Slice Architecture
  • Design Methodology: Domain-Driven Design (DDD)
  • Dependency Injection: Uber Fx - A dependency injection system for Go applications

Backend Development

  • Language: Go
  • Command Line: spf13/cobra - A Commander for modern Go CLI interactions
  • Configuration: spf13/viper - Go configuration with fangs
  • Testing: uber-go/gomock - A mocking framework for Go interfaces

Database & ORM

  • Main Database: MySQL
  • ORM: Bun - A fast and simple ORM for Go
  • Development DB: dolthub/go-mysql-server - In-memory MySQL server for development and testing

API & Communication

  • HTTP Framework: gofiber/fiber - Express inspired web framework built on top of Fasthttp
  • API Style: REST API
  • API Documentation: swaggo/swag - Swagger documentation generator for Go
  • Live API Documentation: Swagger UI
  • Authentication:

AI/ML Integration

External Libraries

πŸ“ DIRECTORY

.
β”œβ”€β”€ cmd/                # Application running commands
β”‚
β”œβ”€β”€ config/             # Configuration files
β”‚
β”œβ”€β”€ docs/               # Swagger documentations
β”‚
β”œβ”€β”€ internal/           # Private application code
β”‚   β”œβ”€β”€ domain/         # Domain models and business logic
β”‚   β”‚   β”œβ”€β”€ chat/       # Chat domain models
β”‚   β”‚   β”œβ”€β”€ common/     # Common domain models
β”‚   β”‚   β”œβ”€β”€ diagnosis/  # Diagnosis domai
8000
n models
β”‚   β”‚   └── user/       # User domain models
β”‚   β”‚
β”‚   β”œβ”€β”€ handler/        # HTTP request handlers
β”‚   β”‚   β”œβ”€β”€ future/     # Future-Job handlers
β”‚   β”‚   β”œβ”€β”€ rest/       # REST-API handlers
β”‚   β”‚   └── websocket/  # Websocket handlers
β”‚   β”‚
β”‚   β”œβ”€β”€ dependency/     # Dependency injection
β”‚   β”‚
β”‚   └── entrypoint/     # Application entry points
β”‚       └── http/       # HTTP server entrypoint
β”‚
β”œβ”€β”€ migration/          # Database migration files
β”‚   └── sql/            # Migration SQL scripts
β”‚
β”œβ”€β”€ pkg/                # Public library code
β”‚   β”œβ”€β”€ database/       # Database utilities
β”‚   β”‚   β”œβ”€β”€ mysql/      # MySQL implementation
β”‚   β”‚   └── memdb/      # In-memory database
β”‚   β”‚
β”‚   β”œβ”€β”€ future/         # Future utilities
β”‚   β”‚   └── database/   # Database-backed implementation
β”‚   β”‚
β”‚   β”œβ”€β”€ http/           # HTTP utilities
β”‚   β”‚
β”‚   β”œβ”€β”€ jwt/            # JWT authentication
β”‚   β”‚
β”‚   β”œβ”€β”€ llm/            # LLM integration
β”‚   β”‚   └── gemini/     # Google Gemini integration
β”‚   β”‚
β”‚   β”œβ”€β”€ oauth/          # OAuth integration
β”‚   β”‚   └── google/     # Google OAuth
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/          # Common utilities
β”‚   β”‚
β”‚   └── websocket/      # WebSocket utilities
β”‚
β”œβ”€β”€ resource/           # Static resources
β”‚   β”œβ”€β”€ diagnosis/      # Diagnosis resources
β”‚   └── llm/            # LLM resources
β”‚       β”œβ”€β”€ attachment/ # LLM attachments
β”‚       └── prompt/     # LLM prompts
β”‚
β”œβ”€β”€ test/               # Test files
β”‚   └── mock/           # Test mocks
β”‚
β”œβ”€β”€ .deploy/            # Deployment configurations
β”‚
β”œβ”€β”€ .github/            # GitHub related files
β”‚   └── workflows/      # GitHub Actions workflows
β”‚
β”œβ”€β”€ main.go             # Main application entry
└── go.mod              # Go module definition

πŸš€ LAUNCH

# 1. Install dependencies
go mod download

# 2. Set up environment variables
vi .envrc

# 3. Apply environment variables
source .envrc

# 4. Start the server with local configurations
go run main.go http -n "local"

β₯ ARCHITECTURE

SERVER-ARCHITECTURE

🏎️ PERFORMANCE

SERVER-PERFORMANCE Benchmarked on a GKE Managed Pod (180 mCPU / 256 MiB)

πŸ“± FEATURE

  • AI Counseling With Um
  • Psychological Assessments
    • International standard tests PHQ-9 / GAD-7 / PSS
  • AI Analysis of Conversation Content
    • Summary and organization of the conversation
    • Sharing feedback and areas for improvement

✨ VALUE

  • Available for consultation anytime, anywhere
  • Personalized consultation possible
  • Reduced barriers to seeking counseling
  • Access to a pre-trained professional psychological counseling AI

🚧 KNOWN-ISSUES

This project was developed under a tight timeline to build a functional end-to-end service. As a result, some pragmatic architectural trade-offs were made, which are outlined below as part of a transparent technical roadmap.

1. Performance Optimization for Chat Filtering

  • Issue: The current implementation of the chat list endpoint (GET /chats), specifically when using the matching_content filter, performs its search logic in the application layer.
  • Impact: This pattern results in a classic N+1 query problem. It was a calculated risk to accelerate initial development for the current user base, but this approach will not scale efficiently and can lead to significant latency under heavy load.
  • Path Forward: The filtering logic will be delegated to the database. The roadmap includes refactoring the query to use efficient JOINs. For a definitive, long-term solution, implementing a Full-Text Search index is planned to handle large-scale text searches with minimal latency.

2. Architectural Flexibility for Business Logic

  • Current Approach: To maintain a lean architecture and maximize development velocity, most features follow a simple two-layer vertical slice (Handler -> Domain).
  • Potential Challenge: For features with more complex business logic, such as the report generation in GetChatReportHandler, some orchestration logic currently resides within the handler, which could lead to overly complex handlers as the application grows.
  • Future Consideration: If a feature's complexity warrants it, a dedicated usecase layer can be introduced. This provides a clear and scalable pattern for managing increased complexity as it arises, without prematurely over-engineering simpler features.

About

2025 Google Solution Challenge Server Repository for Team Ondaum

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0