# Blog Core

Complete blog state management with Zustand. Includes useBlogStore for saved/favorite posts functionality. TypeScript types for Post, Category, and Author. No provider wrapping needed. Data fetching uses useDbList/useDbGet from @/db.

## Files

| Target | Type |
|--------|------|
| `$modules$/blog-core/index.ts` | index |
| `$modules$/blog-core/types.ts` | type |
| `$modules$/blog-core/stores/blog-store.ts` | store |
| `$modules$/blog-core/lang/en.json` | lang |
| `$modules$/blog-core/lang/tr.json` | lang |
| `$modules$/blog-core/lang/pt.json` | lang |

## Exports

**Types:** `Author`, `BlogCategory`, `BlogContextType`, `BlogSettings`, `Comment`, `Post`

**Components/Functions:** `useBlog`, `useBlogStore`

```typescript
import { useBlog, useBlogStore, Author, ... } from '@/modules/blog-core';
```

## Usage

```
import { useBlog } from '@/modules/blog-core';
import { useDbList, useDbGet } from '@/db';
import type { Post } from '@/modules/blog-core';

// Blog store (favorites, saved posts):
const { favorites, addToFavorites, isFavorite } = useBlog();

// Data fetching via @/db hooks:
const { data: posts } = useDbList<Post>('posts');
const { data: post } = useDbGet<Post>('posts', { where: { slug } });

// Or use store directly with selectors:
const favorites = useBlogStore((s) => s.favorites);
```
