A modern, interactive web application that provides a console-like interface for testing and exploring various APIs. Built with React, TypeScript, and Redux Toolkit, featuring real-time search, highlighting, and a responsive design.
π Live Demo: https://reactive-api-console.vercel.app
- Interactive API Testing: Execute commands to fetch data from various APIs
- Real-time Search: Global search across all API responses with highlighting
- Responsive Design: Modern UI built with Tailwind CSS
- Type Safety: Full TypeScript support throughout the application
- State Management: Redux Toolkit for predictable state management
- Reactive Programming: RxJS for handling asynchronous operations and data streams
- Comprehensive Testing: Unit tests, integration tests, and E2E tests with Cypress
- Frontend: React 19, TypeScript, Vite
- Styling: Tailwind CSS 4
- State Management: Redux Toolkit, React Redux
- Reactive Programming: RxJS
- Testing: Vitest, Testing Library, Cypress
- Build Tool: Vite
- Package Manager: pnpm
- Node.js 20 or higher
- pnpm (recommended) or npm
git clone https://github.com/marafa1985/reactive-api-console.git
cd reactive-api-console
# Using pnpm (recommended)
pnpm install
# Or using npm
npm install
pnpm dev
The application will be available at http://localhost:5173
The console supports the following commands:
help
- Display available commandsclear
- clear all resultshistory
- Display messages historyget cat fact
- Fetch a random cat factget chuck norris joke
- Get a Chuck Norris jokeget bored activity
- Get a random activity suggestionget github users
- Search GitHub usersget weather
- Get weather information
- Command Input: Type commands in the chat console
- API Panels: View responses in dedicated panels
- Global Search: Search across all responses with highlighting
- Response Filtering: Filter results based on search terms
- Response Pinning: Pin important responses for quick access
Run unit tests with Vitest:
# Run all tests
pnpm test
# Run tests with UI
pnpm test:ui
# Run tests with coverage
pnpm test:coverage
Run end-to-end tests with Cypress:
# Open Cypress Test Runner
pnpm cy:open
# Run Cypress tests in headless mode
pnpm cy:run
# Run component tests
pnpm cy:open --component
pnpm lint
pnpm build
pnpm build
pnpm preview
reactive-api-console/
βββ .github/workflows/ # GitHub Actions CI/CD
β βββ ci-cd.yml # Main CI/CD pipeline
βββ cypress/ # E2E and Component Testing
β βββ component/ # Cypress component tests
β β βββ ChatTitle.cy.tsx
β βββ e2e/ # End-to-end tests
β β βββ api-console.cy.ts
β β βββ drag-drop.cy.ts
β β βββ export.cy.ts
β β βββ highlighting.cy.ts
β β βββ redux-integration.cy.ts
β βββ fixtures/ # Test data
β β βββ cat-fact.json
β β βββ example.json
β βββ support/ # Cypress support files
β β βββ commands.ts
β β βββ component.ts
β β βββ e2e.ts
β βββ cypress.config.js # Cypress configuration
βββ public/ # Static assets
β βββ robots.txt
β βββ vite.svg
βββ src/ # Source code
β βββ assets/ # Static assets
β β βββ react.svg
β βββ components/ # React components (Atomic Design)
β β βββ atoms/ # Basic building blocks
β β β βββ APINotFound/
β β β βββ ChatSearchResult/
β β β βββ ChatTitle/
β β β βββ ChatWelcomeMessage/
β β β βββ DragHint/
β β β βββ DropIndicator/
β β β βββ HighlightText/
β β β βββ NoActiveAPI/
β β β βββ NoActivePanel/
β β β βββ NoResponses/
β β β βββ NoResultMatched/
β β β βββ PanelTitle/
β β β βββ ResultWrapper/
β β β βββ SearchSummary/
β β βββ molecules/ # Composite components
β β β βββ BoredAPI/
β β β βββ CatFacts/
β β β βββ ChatCommand/
β β β βββ ChatLog/
β β β βββ ChatSearch/
β β β βββ ChuckNorris/
β β β βββ ChuckNorrisJoke/
β β β βββ DefaultAPIResponse/
β β β βββ DraggableTab/
β β β βββ FilterPanel/
β β β βββ GithubUsers/
β β β βββ PanelHeader/
β β β βββ SideBarHeader/
β β β βββ UserCommandInputProps/
β β β βββ Weather/
β β βββ organisms/ # Complex components
β β β βββ ApiPanel/
β β β βββ APIPanelContent/
β β β βββ ApiPanelHeader/
β β β βββ ApiPanelWrapper/
β β β βββ AvailableAPIs/
β β β βββ ChatMessages/
β β β βββ ChatPanel/
β β βββ pages/ # Page components
β β β βββ Home/
β β βββ template/ # Layout templates
β β βββ ApiPanels.tsx
β β βββ Chat.tsx
β β βββ Header.tsx
β β βββ ResponsesPanel.tsx
β β βββ SideBar.tsx
β βββ core/ # Business logic
β β βββ api/ # API integrations
β β β βββ bored.api.ts
β β β βββ cat-fact.api.ts
β β β βββ chuck-norris.api.ts
β β β βββ github-users.api.ts
β β β βββ registry.ts
β β β βββ utils.ts
β β β βββ weather.api.ts
β β βββ entity/ # Domain entities
β β β βββ api-response.ts
β β β βββ api.ts
β β β βββ chat-messages.ts
β β β βββ user-command.ts
β β βββ use-case/ # Business use cases
β β βββ api-command.use-case.ts
β βββ hooks/ # Custom React hooks
β β βββ useApiCommands.ts
β β βββ useApiPanelsSortOrder.ts
β β βββ useApiSelectedPanel.ts
β β βββ useChat.ts
β β βββ useChatMessage.ts
β β βββ useCommandInput.ts
β β βββ useFilters.ts
β β βββ useSpecialCommand.ts
β βββ store/ # Redux store
β β βββ feature/ # Redux slices
β β β βββ slices/
β β β βββ apisSlice.ts
β β β βββ chatSlice.ts
β β β βββ filtersSlice.ts
β β β βββ responsesSlice.ts
β β β βββ uiSlice.ts
β β βββ hooks.ts # Redux hooks
β β βββ store.ts # Store configuration
β β βββ StoreProvider.tsx # Store provider
β βββ utils/ # Utility functions
β β βββ cn.ts # Class name utility
β β βββ formatTimestamp.ts
β β βββ highlight.ts # Text highlighting
β β βββ index.ts
β βββ App.tsx # Main App component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles
β βββ test-setup.ts # Test configuration
βββ .eslintrc.js # ESLint configuration
βββ .gitignore # Git ignore rules
βββ cypress.config.js # Cypress configuration
βββ index.html # HTML template
βββ package.json # Dependencies and scripts
βββ pnpm-lock.yaml # Lock file
βββ pnpm-workspace.yaml # Workspace configuration
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.app.json # App-specific TS config
βββ tsconfig.node.json # Node-specific TS config
βββ vite.config.ts # Vite configuration
βββ vitest.config.ts # Vitest configuration
No environment variables are required for basic functionality. The application uses public APIs.
The application integrates with the following public APIs:
- Cat Facts:
https://catfact.ninja/fact
- Chuck Norris Jokes:
https://api.chucknorris.io/jokes/random
- Bored API:
https://www.boredapi.com/api/activity
- GitHub Users:
https://api.github.com/search/users
- Weather:
https://api.open-meteo.com/v1/forecast
- Connect your repository to Vercel
- Vercel will automatically detect the Vite configuration
- Deploy with default settings
# Build the application
pnpm build
# The built files will be in the `dist/` directory
# Deploy the contents of `dist/` to your hosting provider
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow the existing code style and structure
- Write tests for new features
- Update documentation as needed
- Use conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the existing issues in the repository
- Create a new issue with detailed information
- Include steps to reproduce the problem
The project includes a comprehensive CI/CD pipeline with the following stages:
- Lint: Code quality checks
- Test: Unit and integration tests with coverage
- Build: Production build verification
- E2E: End-to-end testing with Cypress
The pipeline runs on every push and pull request to ensure code quality and functionality.