This is a React-based frontend application for a Todo app. It includes dependencies for routing, UI notifications, API requests, and testing. This project was created as part of Assignment 1 for my CI/CD course. I am currently studying at the Auckland Institute of Studies.
- Demo
- Installation
- Usage
- Features
- Configuration
- Project Structure
- Available Scripts
- Testing
- Deployment
- Contributing
- License
A live demo of the project.
Ensure you have Node.js installed. Then, clone the repository and install dependencies:
git clone https://github.com/NPZlatu/Frontend-TodoList
cd todo_frontend
npm installThis command starts the development server:
npm startThe application will be available at http://localhost:3000/.
To create a production build, run:
npm run build:prodThe output will be placed in the build/ folder.
To create a build for local use:
npm run build:local- React 18 for building UI components.
- React Router for navigation.
- Axios for making API requests.
- TailwindCSS for styling.
- React Toastify for notifications.
- Cypress for end-to-end testing.
- React Testing Library for unit testing.
- Jest for running tests.
- Cross-env for environment variable management.
The src/config.js file acts as a configuration file for different environments. It contains settings for API URLs and other environment-specific values.
Example configuration:
export const API_URL = "https://api.example.com";
📦 todo_frontend
├── 📂 public # Static files (index.html, favicons, etc.)
├── 📂 src # Application source code
│ ├── 📂 components # Reusable UI components
│ ├── 📂 App
│ │ ├── AppComponent.js # Main application component
│ │ ├── AppComponent.css # Main component styles
│ │ ├── AppComponent.test.js # Unit tests for Main component
│ ├── Other Components
│ ├── 📜 config.js # Configuration file
│ └── 📜 index.js # Entry point
├── 📂 cypress # End-to-end tests
├── 📜 package.json # Dependencies and scripts
├── 📜 tailwind.config.js # TailwindCSS configuration
└── 📜 README.md # Documentation
npm start # Start the development server
npm run build # Build for production
npm test # Run unit and integration tests
npm run e2e:local # Run Cypress E2E tests in local environment
npm run e2e:prod # Run Cypress E2E tests in production environmentnpm testFor local environment:
npm run e2e:localFor production environment:
npm run e2e:prodThis project is deployed using Vercel. Any changes pushed to the repository trigger an automatic deployment.
To manually build and deploy:
npm run build- Fork the repository.
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -m 'Add new feature' - Push the branch:
git push origin feature-name - Submit a Pull Request.
This project is licensed under the MIT License.