Add complete Biblical Guide web application with Material UI
Implemented comprehensive Romanian Biblical Guide web app: - Next.js 15 with App Router and TypeScript - Material UI 7.3.2 for modern, responsive design - PostgreSQL database with Prisma ORM - Complete Bible reader with book/chapter navigation - AI-powered biblical chat with Romanian responses - Prayer wall for community prayer requests - Advanced Bible search with filters and highlighting - Sample Bible data imported from API.Bible - All API endpoints created and working - Professional Material UI components throughout - Responsive layout with navigation and theme 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
46
lib/store/index.ts
Normal file
46
lib/store/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { create } from 'zustand'
|
||||
import { persist } from 'zustand/middleware'
|
||||
import { User, Bookmark } from '@/types'
|
||||
|
||||
interface AppState {
|
||||
user: User | null
|
||||
theme: 'light' | 'dark'
|
||||
fontSize: 'small' | 'medium' | 'large'
|
||||
currentBook: number
|
||||
currentChapter: number
|
||||
bookmarks: Bookmark[]
|
||||
setUser: (user: User | null) => void
|
||||
setTheme: (theme: 'light' | 'dark') => void
|
||||
setFontSize: (size: 'small' | 'medium' | 'large') => void
|
||||
setCurrentBook: (book: number) => void
|
||||
setCurrentChapter: (chapter: number) => void
|
||||
addBookmark: (bookmark: Bookmark) => void
|
||||
removeBookmark: (bookmarkId: string) => void
|
||||
}
|
||||
|
||||
export const useStore = create<AppState>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
user: null,
|
||||
theme: 'light',
|
||||
fontSize: 'medium',
|
||||
currentBook: 1,
|
||||
currentChapter: 1,
|
||||
bookmarks: [],
|
||||
setUser: (user) => set({ user }),
|
||||
setTheme: (theme) => set({ theme }),
|
||||
setFontSize: (fontSize) => set({ fontSize }),
|
||||
setCurrentBook: (currentBook) => set({ currentBook }),
|
||||
setCurrentChapter: (currentChapter) => set({ currentChapter }),
|
||||
addBookmark: (bookmark) => set((state) => ({
|
||||
bookmarks: [...state.bookmarks, bookmark]
|
||||
})),
|
||||
removeBookmark: (bookmarkId) => set((state) => ({
|
||||
bookmarks: state.bookmarks.filter(b => b.id !== bookmarkId)
|
||||
})),
|
||||
}),
|
||||
{
|
||||
name: 'bible-chat-storage',
|
||||
}
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user