An interactive flashcards application built with React. Create, study, and manage flashcard decks to reinforce your learning through active recall and spaced repetition.
- Features
- Architecture
- Getting Started
- Available Scripts
- Project Structure
- Tech Stack
- Contributing
- License
- Author
- Interactive card-flipping animation with CSS 3D transforms
- Navigate through flashcard decks with previous/next controls
- Context-based state management for flashcard data
- Custom
useLocalStoragehook for persistent data - Clean, responsive UI with CSS custom properties
- Modular component architecture (common, layout, features)
- Barrel exports for clean import paths
App
├── FlashcardProvider (Context)
│ ├── Header
│ ├── Home (Page)
│ │ └── FlashcardDeck (Feature)
│ │ └── Card (Common)
│ └── Footer
src/
├── assets/
│ ├── images/
│ └── icons/
├── components/
│ ├── common/
│ │ └── Card/
│ │ ├── Card.jsx
│ │ ├── Card.css
│ │ └── index.js
│ ├── layout/
│ │ ├── Header/
│ │ │ ├── Header.jsx
│ │ │ ├── Header.css
│ │ │ └── index.js
│ │ └── Footer/
│ │ ├── Footer.jsx
│ │ ├── Footer.css
│ │ └── index.js
│ └── features/
│ └── FlashcardDeck/
│ ├── FlashcardDeck.jsx
│ ├── FlashcardDeck.css
│ └── index.js
├── hooks/
│ └── useLocalStorage.js
├── context/
│ └── FlashcardContext.js
├── pages/
│ └── Home/
│ ├── Home.jsx
│ ├── Home.css
│ └── index.js
├── services/
├── utils/
├── constants/
│ └── index.js
├── styles/
│ ├── index.css
│ └── variables.css
├── App.jsx
├── App.css
├── index.js
├── reportWebVitals.js
└── setupTests.js
-
Clone the repository:
git clone https://github.com/R-Alothaim/Cards-app-React.git cd Cards-app-React -
Install dependencies:
npm install
-
Start the development server:
npm start
The app will open at http://localhost:3000.
| Command | Description |
|---|---|
npm start |
Runs the app in development mode |
npm test |
Launches the test runner in interactive watch mode |
npm run build |
Builds the app for production to the build/ folder |
npm run eject |
Ejects the CRA configuration (one-way operation) |
| Directory | Purpose |
|---|---|
components/common/ |
Reusable UI components (Card, Button, Modal, etc.) |
components/layout/ |
Structural components (Header, Footer, Sidebar) |
components/features/ |
Feature-specific components (FlashcardDeck, QuizMode, etc.) |
hooks/ |
Custom React hooks |
context/ |
React Context providers for global state |
pages/ |
Page-level components that compose layouts and features |
services/ |
API calls and external service integrations |
utils/ |
Helper functions and utilities |
constants/ |
Application-wide constants and configuration |
styles/ |
Global styles and CSS custom properties |
assets/ |
Static assets (images, icons, fonts) |
Each component follows the folder-per-component pattern with a barrel index.js for clean imports:
import Card from 'components/common/Card'; // via barrel export
import Header from 'components/layout/Header'; // via barrel export- React 18 - UI library with functional components and hooks
- Create React App 5 - Zero-config build tooling
- CSS3 - Styling with custom properties (CSS variables) and BEM naming
- Context API - Lightweight state management
- localStorage - Client-side data persistence
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
R-Alothaim - GitHub