scaffold blog_portal vue 3 + pinia + cypress frontend

Mirrors youngstartup/frontend/startups_portal scaffolding:
Vite, Vue 3 (composition API + script setup), TypeScript strict,
Pinia, Vue Router 5, oxlint + eslint + oxfmt, and Cypress with
db:reset / db:seed tasks. Views and the auth store are stubs
filled in by the next branches; routes and the header chrome
are wired so the build passes.
This commit is contained in:
Yisroel Baum 2026-05-06 22:47:09 +03:00
parent 6f95a5b7b8
commit 568dc4aabe
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
27 changed files with 8376 additions and 0 deletions

View file

@ -0,0 +1,37 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export interface AuthUser {
id: number;
email: string;
displayName: string;
isAdmin: boolean;
}
export const useAuthStore = defineStore("auth", () => {
const user = ref<AuthUser | null>(null);
const checked = ref(false);
const error = ref<string | null>(null);
async function fetchMe(): Promise<boolean> {
checked.value = true;
return false;
}
async function logout(): Promise<void> {
user.value = null;
}
function clearError(): void {
error.value = null;
}
return {
user,
checked,
error,
fetchMe,
logout,
clearError,
};
});