Sales Trainer v0.1: corporate sales-training simulator (Flask+Vue, 15 personas, chat simulator, judge, analytics)

- Auth/roles (no self-reg), admin user provision, JWT
- Analyze: sales kit + initial pain-fit from form/upload
- Persona generator: 15 personas (5/tier) w/ pain variety, negotiation, init mode, channel, latent/revealable, wrong_text special
- Chat simulator: per-mode initiation, one-shot, hidden signals, judge-LLM debrief+coaching
- Trainee loop: win/lose board, weak-areas, user-generated personas
- Admin analytics; EN+TH Vue SPA served by Flask
- Deploy: Dockerfile, docker-compose, README, eng-log + HANDOFF
- Tests (mock LLM): m0/m1/routes/e2e all pass
This commit is contained in:
Macky
2026-08-07 15:31:06 +07:00
commit c3d31c06e2
70 changed files with 6135 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<template>
<div class="login-wrap">
<div class="card login-card">
<h1>{{ i18n.t('app') }}</h1>
<label>{{ i18n.t('email') }}</label>
<input v-model="email" type="email" @keyup.enter="submit" />
<label>{{ i18n.t('password') }}</label>
<input v-model="password" type="password" @keyup.enter="submit" />
<div class="error" v-if="error">{{ error }}</div>
<button class="primary" style="width:100%;margin-top:16px" :disabled="loading" @click="submit">
{{ loading ? '...' : i18n.t('login') }}
</button>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { auth } from '../store/auth'
import { i18n } from '../i18n'
const route = useRoute()
const router = useRouter()
const email = ref('')
const password = ref('')
const error = ref('')
const loading = ref(false)
async function submit() {
error.value = ''
loading.value = true
try {
await auth.login(email.value, password.value)
router.push(route.query.redirect || '/')
} catch (e) {
error.value = i18n.t('loginError')
} finally {
loading.value = false
}
}
</script>
<style scoped>
.login-wrap { display: flex; justify-content: center; padding-top: 10vh; }
.login-card { width: 360px; }
h1 { margin-top: 0; }
</style>