Skip to content

cybersmurf/MIMM-2.0

Repository files navigation

MIMM 2.0 🎵

Music In My Mind – Personal journal application for tracking music that plays in your head (mental music) and how it affects your mood and physical sensations.

Build CI Coverage License: MIT .NET Production

Project Status: 🚀 PRODUCTION v2.0.0 – Deployed and operational on VPS! | Build: ✅ 0 errors | Tests: ✅ 45/45 | Deployment: ✅ LIVE | Demo


🎯 What is MIMM?

MIMM stands for "Music In My Mind" – It's the music that plays internally (that you hum, sing, or imagine in your head) without external playback. The MIMM app lets you:

  • 📝 Track mental music – Record songs that play in your mind
  • 😊 Log emotions – How does that mental music affect your mood?
  • 📊 Discover patterns – Which songs (in your head) influence your emotions the most?
  • 🧠 Understand yourself – See correlations between imagined music and feelings

Key differentiator: Unlike music streaming apps, MIMM focuses on the emotional and psychological impact of music you imagine, without needing external playback. First-mover advantage in mental music + mood tracking space.


📊 Project Status

✅ What's Done (97%)

  • Backend Infrastructure (100% complete)

    • ASP.NET Core 9 REST API with Controllers ✅
    • Entity Framework Core 9 with PostgreSQL ✅
    • JWT authentication with refresh tokens ✅
    • Custom exception handling + Serilog logging ✅
    • SignalR setup for real-time features ✅
    • Docker containerization ready ✅
  • Frontend UI (100% complete)

    • Blazor WebAssembly with MudBlazor 7.0.0 ✅
    • 7 Pages: Login, Dashboard, Analytics, YearlyReport, Friends, ExportImport, Index ✅
    • 13 Components: EntryList, MoodSelector2D, MusicSearchBox, EntryCreate/EditDialog, NavMenu, NotificationBell, ThemeToggle/Selector, ConfirmDialog, SkipNavigation, LiveRegion, MusicTrackCard ✅
    • Responsive design (xs/sm/md/lg breakpoints) ✅
    • Dark mode + theme customization with persistence ✅
    • Accessibility features (WCAG AAA: ARIA, keyboard nav, focus visible) ✅
  • Core Features (100% complete)

    • User registration & login with error feedback ✅
    • Entry creation/editing/deletion via UI + API ✅
    • Mood selector (2D Valence-Arousal drag/click) ✅
    • Entry list with MudDataGrid pagination & filtering ✅
    • Advanced entry search with debounce (300ms) ✅
  • Analytics & Insights (100% complete)

    • Mood trends line chart (30-day view) ✅
    • Music statistics bar chart (top 5 artists) ✅
    • Mood distribution pie chart (quadrants) ✅
    • Yearly reports with monthly breakdown ✅
    • Mood distribution analysis by quadrant ✅
    • Top artists & songs tracking ✅
    • Mood-by-artist correlation ✅
  • Music Integration (70% complete)

    • Last.fm OAuth token storage ✅
    • Spotify OAuth token storage ✅
    • Music search service (MusicBrainz, Deezer, iTunes integration with rate limiting) ✅
    • Music search UI with autocomplete ✅
    • Last.fm scrobbling implementation (pending, 3-4 hours)
    • ⏳ Spotify now playing sync (optional)
  • Social Features (50% complete)

    • Friend list page ✅
    • Friend request system ✅
    • Shared entries concept ✅
    • ⏳ Real-time notifications (SignalR hub ready)
    • ⏳ Friend activity feed (pending)
  • Data Management (100% complete)

    • Export to JSON/CSV ✅
    • Import from JSON/CSV with validation ✅
    • Data validation on import ✅
    • Soft delete for entries ✅
  • Testing (100% complete)

    • 40 unit tests (Auth, Entry, Analytics, Friends services) ✅
    • 5 integration tests ✅
    • E2E tests ready (Playwright suite with ~10 scenarios) ✅
  • Documentation (100% complete)

  • UX/UI Polish (100% complete)

    • Phase 1: Navigation drawer + dashboard data + login feedback + empty states ✅
    • Phase 2: Search debounce + MoodSelector accessibility + wizard tabs + charts ✅
    • Phase 3: Design tokens + micro-interactions + theme toggle + responsive audit ✅
    • Loading skeletons throughout app ✅
    • Micro-animations (fade-in, stagger, transitions) ✅
    • CSS design system (variables, grid, spacing, shadows) ✅

🚧 What's Remaining (3%)

  • E2E Test Execution (1-2 hours)

    • Playwright test suite (manual trigger - ready for execution)
    • Debug CI environment (if needed)
    • Generate HTML report
  • Final Documentation (2-3 hours)

    • User guide Last.fm section
    • Admin onboarding guide
    • Deployment checklist
  • Security & Performance (3-4 hours)

    • CORS hardening for production
    • Rate limiting on public endpoints
    • EF Core query optimization (global filter warnings)
    • Frontend bundle optimization

❌ What's NOT Started Yet (Phase 2+)

  • Admin Panel

    • User management dashboard
    • Moderation tools
    • System metrics
  • Advanced Features

    • Mood prediction (ML)
    • Recommendation engine
    • Seasonal pattern analysis
    • Performance optimization (lazy loading, caching)
    • Real-time notifications
    • Collaborative features
    • Mobile PWA
    • Dark mode
    • Multi-language support
  • Testing & Quality

    • Unit tests (10% coverage)
    • Integration tests (not started)
    • E2E tests (not started)
    • Security audit
    • Performance testing

📈 Development Roadmap (Next 8 Weeks)

Week 1-2: MVP Foundation

  • Complete user registration & login (E2E test)
  • Basic entry creation form
  • Mood selector UI
  • Database schema validation

Week 3-4: Core Features

  • Entry list & display
  • Edit/delete entries
  • Music search integration
  • 50+ test coverage

Week 5-6: Analytics & Polish

  • Basic mood analytics
  • Chart visualizations
  • UI/UX refinement
  • Performance optimization

Week 7-8: Integration & Deployment

  • Last.fm integration
  • Production deployment setup
  • Security hardening
  • Documentation completion

🏗️ Architecture

Stack

  • Backend: ASP.NET Core 9 (REST API + SignalR)
  • Frontend: Blazor WebAssembly (C# SPA)
  • Database: PostgreSQL 16 + Entity Framework Core 9
  • Caching: Redis (optional)
  • Authentication: JWT + Refresh Tokens
  • Password Security: BCrypt (workFactor: 12)
  • Testing: xUnit + FluentAssertions + Moq
  • CI/CD: GitHub Actions
  • Deployment: Docker + Nginx

Project Structure

MIMM-2.0/
├── src/
│   ├── MIMM.Backend/              # ASP.NET Core 9 API (3620 lines)
│   │   ├── Controllers/           # REST endpoints (scaffolded)
│   │   ├── Services/              # Business logic (incomplete)
│   │   ├── Data/                  # EF Core DbContext + migrations
│   │   ├── Hubs/                  # SignalR real-time hubs
│   │   ├── Middleware/            # Exception handling, logging
│   │   └── Program.cs             # DI configuration, middleware pipeline
│   ├── MIMM.Frontend/             # Blazor WASM (850 lines, 30% done)
│   │   ├── Pages/                 # Razor pages (scaffold only)
│   │   ├── Components/            # Reusable MudBlazor components
│   │   ├── Services/              # Refit HTTP clients
│   │   └── Program.cs             # Client DI & authentication
│   └── MIMM.Shared/               # Shared DTOs & entities (complete)
│       ├── Dtos/
│       └── Entities/
├── tests/
│   ├── Application.Tests/         # Weather API demo (17 tests passing)
│   ├── MIMM.Tests.Unit/           # Backend unit tests (scaffold)
│   └── MIMM.Tests.Integration/    # Integration tests (scaffold)
├── docs/
│   ├── DEVELOPER_GUIDE.md         # Development workflow
│   ├── USER_GUIDE.md              # End-user documentation
│   └── PROMPTS_CATALOG.md         # Copilot prompts
├── .github/
│   ├── workflows/                 # CI/CD pipelines
│   ├── prompts/                   # Reusable Copilot prompts
│   └── copilot-instructions.md   # Code generation rules
├── docker-compose.yml             # PostgreSQL + Redis stack
├── Dockerfile                      # Production image
└── MIMM.sln

🚀 Quick Start

Prerequisites

1. Clone & Setup

git clone https://github.com/cybersmurf/MIMM-2.0.git
cd MIMM-2.0
dotnet restore

2. Start Database

docker-compose up -d postgres redis

3. Configure Environment

# Copy example
cp src/MIMM.Backend/appsettings.Development.json.example \
   src/MIMM.Backend/appsettings.Development.json

# Edit with your settings
dotnet user-secrets set "Jwt:Key" "your-256-bit-key-here"

4. Run Migrations

cd src/MIMM.Backend
dotnet ef database update

5. Start Backend

dotnet run
# Backend: https://localhost:7001
# Swagger: https://localhost:7001/swagger

6. Start Frontend

cd src/MIMM.Frontend
dotnet run
# Frontend: https://localhost:5001

7. Open Browser

Navigate to https://localhost:5001 and test the application.


📚 Documentation

🔥 Analysis & Planning (NEW)

🎯 Development

📋 Prompts & Instructions

🚀 Deployment


🧪 Testing

Run Tests

# All tests
dotnet test MIMM.sln

# Specific project
dotnet test tests/Application.Tests/

# With coverage
dotnet test MIMM.sln --collect:"XPlat Code Coverage"

Run CI Locally

# Build (Release)
dotnet build MIMM.sln --configuration Release

# Test (Release)
dotnet test MIMM.sln --configuration Release --no-build -v minimal

🔐 Environment Variables

Variable Description Required
ConnectionStrings__DefaultConnection PostgreSQL ✅ Yes
Jwt__Key JWT signing key (256-bit) ✅ Yes
Jwt__Issuer JWT issuer ✅ Yes
Jwt__Audience JWT audience ✅ Yes
LastFm__ApiKey Last.fm API key ⚠️ Optional
LastFm__SharedSecret Last.fm secret ⚠️ Optional

See appsettings.json for the complete list.


🛠️ Useful Commands

# Build
dotnet build MIMM.sln

# Restore packages
dotnet restore

# Run backend
dotnet run -p src/MIMM.Backend

# Create migration
dotnet ef migrations add MigrationName -p src/MIMM.Backend

# Update database
dotnet ef database update -p src/MIMM.Backend

# Format code
dotnet format

# Clean build
dotnet clean && dotnet build

🌍 Deployment

Local Docker

docker-compose up -d
# Backend: http://localhost:80

Azure App Service

See DEPLOYMENT_CHECKLIST.md for detailed steps.

Deployment Checklist

  • Database: PostgreSQL managed instance (Azure Database for PostgreSQL)
  • SSL/TLS: Let's Encrypt or Azure-managed certificates
  • Environment: Production appsettings with Key Vault integration
  • CI/CD: GitHub Actions deployment on release tag
  • Monitoring: Application Insights, custom events logging
  • Backup: Automated database backups (daily)
  • Scaling: App Service Plan configured for load
  • DNS: CNAME records pointing to app service

🔒 Security

JWT Authentication

  • Algorithm: HS256 (HMAC-SHA256)
  • Access Token: 15-minute expiry
  • Refresh Token: 7-day expiry
  • Token ID: "jti" claim for future revocation tracking
  • Password Hashing: BCrypt (workFactor: 12)

CORS Policy

  • Development: http://localhost:3000, http://localhost:5000
  • Production: Add environment-specific allowed origins
  • Credentials: enabled for authentication

Environment Variables (Production)

# Never commit secrets - use Azure Key Vault
ASPNETCORE_ENVIRONMENT=Production
ConnectionStrings__DefaultConnection=Server=prod-db.postgres.database.azure.com;...
Jwt__Key=<generate-256-bit-key>
Jwt__Issuer=https://mimm.app
Jwt__Audience=https://mimm.app
Cors__AllowedOrigins__0=https://mimm.app
Cors__AllowedOrigins__1=https://www.mimm.app

Production Hardening Checklist

  • Enable HTTPS only (remove HTTP)
  • Set secure cookies (SameSite=Strict, HttpOnly)
  • Add rate limiting on auth endpoints
  • Implement CSRF protection
  • Add request logging for audit trail
  • Configure WAF (Azure Application Gateway)
  • Database: Enable SSL/TLS for connections
  • Database: Enable row-level security for user data
  • API: Version management (accept only /api/v1)
  • API: Request size limits
  • API: Response compression (gzip)
  • Frontend: Content Security Policy headers
  • Frontend: X-Frame-Options, X-Content-Type-Options headers
  • Monitoring: Application Insights integration

🏆 Quick Start

See 📚 Documentation section above for comprehensive guides.


🤝 Contributing

Read CONTRIBUTING.md before submitting PRs.

Code Standards

  • C# 13 (modern syntax: collection expressions, primary constructors)
  • #nullable enable in all files
  • Conventional commits: feat:, fix:, docs:, test:, refactor:
  • 80%+ test coverage target

📊 Metrics

Metric Value
Total Lines (Backend) 3,620
Total Lines (Frontend) 850
Source Files 43
Test Files 3
Test Coverage ~10%
Project Completion 97%
Est. Remaining Hours 20-30 (E2E + Docs + Deploy)

📜 License

MIT License – see LICENSE.


📞 Support


Built with ❤️ using .NET 9 & Blazor


Version: 2.0.1 (Security Hardening & Comprehensive Documentation) Last Updated: 26. ledna 2026

About

Music In My Mind - Nextgen version

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors