A production-ready React admin dashboard built with modern web technologies including React, Redux Toolkit, Tailwind CSS, and React Router.
- β Modern Tech Stack: React 18, Redux Toolkit, Tailwind CSS 3
- β Declarative Routing: React Router v6 with nested routes
- β State Management: Redux Toolkit with async thunks
- β API Integration: Axios with interceptors and error handling
- β Responsive Design: Mobile-first, fully responsive layouts
- β Clean Architecture: Scalable folder structure
- β Production Comments: Enterprise-level code documentation
- β Custom Tailwind Theme: Easy-to-use utility classes
maktech_website_frontend/
βββ public/
βββ src/
β βββ components/ # Reusable UI components
β β βββ Sidebar.jsx
β βββ features/ # Redux slices by feature
β β βββ products/
β β βββ productsAPI.js # API calls with Axios
β β βββ productsSlice.js # Redux slice with extraReducers
β βββ layout/ # Layout components
β β βββ AdminLayout.jsx
β βββ pages/ # Page components
β β βββ Login.jsx
β β βββ Dashboard.jsx
β β βββ ComingSoon.jsx
β βββ services/ # API configuration
β β βββ apiClient.js
β βββ utils/ # Utility functions
β β βββ helpers.js
β β βββ constants.js
β βββ App.jsx # Main app with routing
β βββ main.jsx # Entry point
β βββ store.js # Redux store configuration
β βββ index.css # Global styles + Tailwind
βββ index.html
βββ package.json
βββ vite.config.js
βββ tailwind.config.js
βββ postcss.config.js
βββ README.md
The project includes custom Tailwind utility classes for consistent branding:
bg-primary-bg- Main background color (#1e293b)text-primary-text- Primary text color (#f8fafc)hover:bg-primary-hover- Hover state color (#334155)
<div className="bg-primary-bg text-primary-text hover:bg-primary-hover">
Custom styled element
</div>| Route | Component | Description |
|---|---|---|
/ |
Login | Demo login page with credentials |
/admin |
AdminLayout | Main admin layout wrapper |
/admin/dashboard |
Dashboard | Main dashboard with stats |
/admin/emails |
ComingSoon | Email management (coming soon) |
/admin/leads |
ComingSoon | Lead management (coming soon) |
/admin/orders |
ComingSoon | Order management (coming soon) |
/admin/case-studies |
ComingSoon | Case studies (coming soon) |
/admin/blog |
ComingSoon | Blog management (coming soon) |
/admin/jobs |
ComingSoon | Job postings (coming soon) |
/admin/pricing |
ComingSoon | Pricing management (coming soon) |
Use these credentials on the login page:
- Email: admin@test.com
- Password: 123
- Node.js 18+ installed
- npm or yarn package manager
npm installnpm run devThe application will start on http://localhost:3000.
npm run buildnpm run preview- react (^18.2.0) - UI library
- react-dom (^18.2.0) - DOM rendering
- react-router-dom (^6.22.1) - Routing
- @reduxjs/toolkit (^2.2.1) - State management
- react-redux (^9.1.0) - React-Redux bindings
- axios (^1.6.7) - HTTP client
- react-icons (^5.0.1) - Icon library
- tailwindcss (^4.0.0) - Utility-first CSS (v4 with CSS-first approach)
- vite (^5.1.4) - Build tool and dev server
- @vitejs/plugin-react (^4.2.1) - React plugin for Vite
The Redux store is configured in src/store.js using Redux Toolkit's configureStore.
Slices are organized by feature in src/features/:
- Each feature has its own folder
- API calls are in
*API.jsfiles (using createAsyncThunk) - State logic is in
*Slice.jsfiles (using createSlice with extraReducers)
// API call with createAsyncThunk
export const fetchProducts = createAsyncThunk(
'products/fetchProducts',
async (_, { rejectWithValue }) => {
const response = await axios.get('/products')
return response.data
}
)
// Slice with extraReducers
const productsSlice = createSlice({
name: 'products',
initialState: { items: [], loading: false, error: null },
reducers: { /* synchronous actions */ },
extraReducers: (builder) => {
builder
.addCase(fetchProducts.pending, (state) => {
state.loading = true
})
.addCase(fetchProducts.fulfilled, (state, action) => {
state.items = action.payload
state.loading = false
})
.addCase(fetchProducts.rejected, (state, action) => {
state.error = action.payload
state.loading = false
})
}
})- AdminLayout: Main wrapper with sidebar and content area
- Sidebar: Fixed navigation with active link highlighting
- Login: Demo login with visible credentials
- Dashboard: Main dashboard with stats cards and product overview
- ComingSoon: Reusable placeholder for unimplemented pages
- Implement Authentication: Add real authentication logic
- Build Feature Pages: Complete the "Coming Soon" pages
- Add Form Validation: Implement form validation library (e.g., React Hook Form)
- API Integration: Connect to your backend API
- Testing: Add unit and integration tests
- Dark Mode: Implement theme switching
- Internationalization: Add multi-language support
All code includes production-level comments explaining:
- File purpose and architecture
- Function parameters and return values
- Component props and usage examples
- Business logic and data flow
- Integration points and dependencies
- Follow the existing folder structure
- Maintain consistent code comments
- Use the custom Tailwind colors for consistency
- Keep components small and focused
- Write reusable utility functions
This project is licensed under the MIT License.
Built with β€οΈ by MakTech Development Team
For questions or issues, please refer to the inline code comments or contact the development team.
Happy Coding! π