CLAUDE.md
src/store/CLAUDE.mdCLAUDE.md
Quality
58/100
Scores the file, not the repository.Length
253 words
7 headings · 6 code blocksRepository
3
— · pushed 123 days agoLast changed
3 days ago
First indexed 3 days ago.1# Store Directory (Redux Toolkit)23## Slice Structure45Each feature slice folder contains:67```8featureName/9├── Types.ts # State and payload interfaces10├── Slice.ts # createSlice with reducers11└── ThunkActions.ts # Async thunk actions12```1314## State Interface Naming1516Prefix with `i`, suffix with `State`:1718```ts19// Types.ts20interface iAuthState {21 user: iUser | null;22 isAuthenticated: boolean;23 isLoading: boolean;24 error: string | null;25}26```2728## Typed Hooks2930Use typed hooks from store setup:3132```ts33import { useAppSelector, useAppDispatch } from "@/store/hooks";3435const user = useAppSelector((state) => state.auth.user);36const dispatch = useAppDispatch();37```3839## Slice Pattern4041```ts42// Slice.ts43import { createSlice, PayloadAction } from "@reduxjs/toolkit";44import { iAuthState } from "./Types";4546const initialState: iAuthState = {47 user: null,48 isAuthenticated: false,49 isLoading: false,50 error: null,51};5253const authSlice = createSlice({54 name: "auth",55 initialState,56 reducers: {57 setUser: (state, action: PayloadAction<iUser>) => {58 state.user = action.payload;59 state.isAuthenticated = true;60 },61 clearUser: (state) => {62 state.user = null;63 state.isAuthenticated = false;64 },65 },66 extraReducers: (builder) => {67 // Handle async thunks here68 },69});7071export const { setUser, clearUser } = authSlice.actions;72export default authSlice.reducer;73```7475## Thunk Actions7677```ts78// ThunkActions.ts79import { createAsyncThunk } from "@reduxjs/toolkit";80import { authService } from "@/services/api/authService";8182export const loginUser = createAsyncThunk(83 "auth/login",84 async (credentials: iLoginCredentials, { rejectWithValue }) => {85 try {86 const response = await authService.login(credentials);87 return response.data;88 } catch (error) {89 return rejectWithValue(error.message);90 }91 }92);93```9495## Normalized Data9697For collections, use normalized shape:9899```ts100interface iEntitiesState<T> {101 byId: Record<string, T>;102 allIds: string[];103}104```105
Also in PluteoJS/next-js-typescript-starter
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| PluteoJS/next-js-typescript-starter.cursor/rules/project-structure.mdc · 3 | Cursor rules | stylearch | 33/100 | 3 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/project-ui-style-guide.mdc · 3 | Cursor rules | lint-formatstylearchui+1 | 77/100 | 3 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/react-component.mdc · 3 | Cursor rules | stylearchtypesui+1 | 66/100 | 3 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/react-typescript.mdc · 3 | Cursor rules | stylearchtypesui | 58/100 | 3 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/shadcn-usage.mdc · 3 | Cursor rules | uido-not | 40/100 | 3 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/typescript-coding.mdc · 3 | Cursor rules | styletypesdocs | 58/100 | 3 days ago | |
| PluteoJS/next-js-typescript-starterCLAUDE.md · 3 | CLAUDE.md | lint-formatarchtypesdo-not | 88/100 | 3 days ago | |
| PluteoJS/next-js-typescript-startersrc/components/CLAUDE.md · 3 | CLAUDE.md | archdo-not | 47/100 | 3 days ago | |
| PluteoJS/next-js-typescript-startersrc/services/CLAUDE.md · 3 | CLAUDE.md | setuparchtypessecurity+1 | 54/100 | 3 days ago |
Diff against .cursor/rules/project-structure.mdc Diff against .cursor/rules/project-ui-style-guide.mdc Diff against .cursor/rules/react-component.mdc Diff against .cursor/rules/react-typescript.mdc Diff against .cursor/rules/shadcn-usage.mdc Diff against .cursor/rules/typescript-coding.mdc Diff against CLAUDE.md Diff against src/components/CLAUDE.md Diff against src/services/CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.3k | CLAUDE.md | buildteststylearch+2 | 98/100 | 3 days ago | |
| carrot-foundation/middle-earthCLAUDE.md · 0 | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 days ago | |
| caliber-ai-org/ai-setupCLAUDE.md · 1.2k | CLAUDE.md | buildtestlint-formatstyle+1 | 97/100 | 3 days ago |
