2025.04.03 (Thu)

โœจ 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