2025.04.03 (λͺ©)

✨ GPT Summary γ€€

A day spent switching the tech stack to Flutter Web + Django, then establishing the overall development roadmap and an English-based development environment.

πŸš€ Roadmap

Step-by-step To-Do List for Phase 1–4 β€” covering:

  1. 🧠 Project planning, tech stack selection, and domain purchase
  2. πŸ› οΈ Flutter Web build + Django static integration (local dev)
  3. πŸ”— Basic trigger API implementation
  4. 🌐 VPS deployment, Nginx setup, and secure domain serving

βœ… PHASE 1 β€” Initial Planning & Strategic Decisions

  • 🧠 Define project scope & security strategy
    • Target audience: undocumented North Korean defectors living in China
    • Objective: provide a secure, disguised, browser-based communication tool
    • UX strategy: mimic a calculator interface to conceal real functionality
  • πŸ€– Choose AI-assisted development approach
    • Use GPT-4o and o1 to assist with design and implementation
    • Apply a β€œVibe Coding” workflow β€” using natural language and iterative prototyping with AI
  • βš™οΈ Choose tech stack
    • Frontend: Flutter Web (for a polished, app-like UI disguised as a calculator)
    • Backend: Django + Django REST Framework (for structured APIs, built-in admin, and security)
    • Deployment: Single VPS container serving both Flutter static files and Django API
  • 🌐 Purchase disguise domain
    • Domain: ___.net
    • Purpose: plausible calculator utility appearance
    • Price: β‚©18,000/year via Korean registrar

βœ… PHASE 2 β€” Local Development: Flutter Web + Django Integration

πŸ”§ 1. Project Environment Setup

  • 🧱 Create Django project
    • django-admin startproject stealthcore .
  • βš™οΈ Create Django app (for API)
    • python manage.py startapp api
  • 🧩 Add 'api' and 'rest_framework' to INSTALLED_APPS
  • 🐍 Create virtual environment and install dependencies
    • python -m venv venv && source venv/bin/activate
    • pip install django djangorestframework whitenoise

πŸ› οΈ 2. Flutter Web Build

  • πŸ’» Initialize Flutter app
    • flutter create ____web
    • Replace default UI with a TextField and Send button
  • πŸ§ͺ Send input via http.post() to /api/check-trigger/
  • πŸ”¨ Build Web output
    • flutter build web
  • πŸ“ Move build files
    • Create frontend_static/ folder in Django root
    • cp -r build/web/* frontend_static/

βš™οΈ 3. Django Static File Serving

  • 🧷 Update settings.py:

    STATIC_URL = '/static/'
    STATICFILES_DIRS = [ BASE_DIR / 'frontend_static' ]
    
  • (Optional) Enable WhiteNoise
    • Add 'whitenoise.middleware.WhiteNoiseMiddleware' to MIDDLEWARE
  • πŸŽ›οΈ Copy build/web/index.html to templates/index.html
  • πŸ› οΈ Fix asset paths in index.html:

    <script src="/static/main.dart.js"></script>
    

πŸ”— 4. Connect Flutter to Django

  • πŸ§ͺ Create /api/check-trigger/ endpoint
    • Accepts POST { input: "..." }
    • Returns { status: "success" } if input is '1004'
  • πŸ” Ensure no trigger strings exist in frontend source
  • πŸ§ͺ Confirm frontend integration with http.post(...)

βœ… PHASE 3 β€” VPS Deployment (Vultr)

πŸ›’ 1. Server Setup

  • Create a Vultr instance (Ubuntu 22.04, 1GB RAM)
  • πŸ”‘ Set up SSH access (ssh root@<ip>)
  • πŸ“¦ Install dependencies:
    • sudo apt update && sudo apt upgrade
    • sudo apt install python3 python3-pip nginx git
    • sudo apt install certbot python3-certbot-nginx

πŸš€ 2. Deploy Django

  • Upload your project (scp or git clone)
  • Set up virtual environment
    • python3 -m venv venv && source venv/bin/activate
    • pip install -r requirements.txt
  • πŸ”« Install and test Gunicorn
    • pip install gunicorn
    • gunicorn stealthcore.wsgi:application

🌐 3. Serve with Nginx

  • Create Nginx config:

    server {
        listen 80;
        server_name ___.net;
    
        location /static/ {
            alias /home/youruser/project/frontend_static/;
        }
    
        location / {
            proxy_pass http://127.0.0.1:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }
    
  • πŸ” Enable HTTPS with Let’s Encrypt
    • sudo certbot --nginx -d ___.net
  • πŸ”„ Restart Nginx:
    • sudo systemctl restart nginx

βœ… PHASE 4 β€” Final Testing & Hardening

  • πŸ’» Visit https://___.net
    • Confirm calculator UI loads successfully
  • πŸ” Enter '1004' in Flutter input and send
    • Django should respond with { "status": "success" }
  • πŸ§ͺ Test invalid input returns denial message

βœ… Final Notes

  • 🧼 Remove all sensitive logic from frontend
  • πŸ”’ Protect future API endpoints with session token validation
  • 🧊 Polish disguise: update app icon, page title, and add fake utility elements
  • 🧠 Write internal docs (deploy.md) for repeatable deployments

πŸ’­ Diary

There were several major changes.

  • I changed course to Flutter Web (Frontend) + Django (Backend).
    • Because I plan to keep using this combination when building apps in the future.
    • And because both are frameworks I have used before, so I can expect much faster productivity.
  • I decided to write all documentation, comments, and commit messages in English.
    • Because writing prompts in English may bring even a small performance improvement.
    • Because most of the world’s latest knowledge is handled in English.
    • Because I need to build the habit of using English often so it becomes more familiar.
  • I decided that Git commit message conventions must follow the standard format used in the development industry.
    • from

      * 21adba0 25.04.03 Thu <Hyuk Min> Chore | README.md: Add more details to roadmap
      
    • to

      * 21adba0 25.04.03 Thu <Hyuk Min> docs(README): add more details to roadmap
      
    • Because unless I plan to live as a solo developer forever, it is right to build the habit of following industry standards early.
    • Because later, if I use a change log-related tool, it will need the standard format to parse the messages properly.

Looking only at the roadmap itself, I think it came out as a guide that should be good enough to follow.

Tomorrow I should keep getting GPT feedback, refine it, and then just follow it as-is.

Leave a comment