Skip to content

feat: establish redux feature-based folder structure and rootReduce#16

Merged
ayshadogo merged 2 commits intoDfunder:mainfrom
jahrulezfrancis:feature/redux-folder-structure
Mar 2, 2026
Merged

feat: establish redux feature-based folder structure and rootReduce#16
ayshadogo merged 2 commits intoDfunder:mainfrom
jahrulezfrancis:feature/redux-folder-structure

Conversation

@jahrulezfrancis
Copy link
Copy Markdown
Contributor

@jahrulezfrancis jahrulezfrancis commented Mar 1, 2026

Summary

This PR establishes a consistent, scalable Redux folder structure following a feature-based organization. It migrates the state management architecture from a monolithic approach to a domain-specific one by distributing slice logic into dedicated directories under src/features/.

Proposed Changes

Feature Directories

Created the following directories under src/features/, each containing boilerplate for Slice.js, Thunks.js, and Selectors.js:

  • auth/
  • campaigns/
  • donations/
  • dashboard/
  • admin/
  • bookmarks/

Store Configuration

  • Root Reducer: Created src/store/rootReducer.js using combineReducers to integrate all new feature reducers.
  • Store Entry: Updated src/store/index.js to import and use the new rootReducer, replacing the previous placeholder logic.

Documentation

  • Added src/store/README.md to define the new folder convention and provide clear instructions for team members on how to add future features.

Impact

  • Maintainability: Logic is now scoped to specific domains, making it easier to locate and modify code.
  • Scalability: New features can be added by following the established pattern without cluttering the main store file.
  • Clarity: The added documentation ensures consistent implementation across the team.

Verification

  • All 6 feature directories and 18 placeholder files created.
  • rootReducer.js correctly imports and combines all feature slices.
  • Store configuration updated and verified for correct imports.

Closes #3

@ayshadogo
Copy link
Copy Markdown
Contributor

Hello @jahrulezfrancis please fix Lint workflow

@jahrulezfrancis
Copy link
Copy Markdown
Contributor Author

@ayshadogo lint error is fixed, kindly check it out

@ayshadogo ayshadogo merged commit a4b1e5c into Dfunder:main Mar 2, 2026
3 checks passed
@jahrulezfrancis jahrulezfrancis mentioned this pull request Mar 2, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup Redux Folder Structure

2 participants