Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramo4040/todo-list-application-php
🚀 Simple ToDo List app built with PHP and JavaScript 🌟
https://github.com/ramo4040/todo-list-application-php
crud javascript php
Last synced: 6 days ago
JSON representation
🚀 Simple ToDo List app built with PHP and JavaScript 🌟
- Host: GitHub
- URL: https://github.com/ramo4040/todo-list-application-php
- Owner: ramo4040
- License: mit
- Created: 2024-05-03T15:07:30.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-05T22:56:55.000Z (6 months ago)
- Last Synced: 2024-05-22T18:32:51.017Z (6 months ago)
- Topics: crud, javascript, php
- Language: CSS
- Homepage:
- Size: 6.26 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ToDo List Application (REST API)
This repository contains a ToDo List application built with native PHP and PDO for database interactions. The application implements user authentication (signup and sign-in) and CRUD functionalities for managing tasks.
## Features
* **User Authentication:**
* Sign up with email and password
* Sign in to access ToDo list functionalities
* **Task Management:**
* Create new tasks
* View list of all tasks
* View individual task details
* Edit existing tasks (using JavaScript PUT request)
* Delete tasks (using JavaScript DELETE request)## Technical Details
* **Backend:** PHP (native)
* **Database:** Any database supported by PDO (MySQL, PostgreSQL, etc.)
* **Dependency Injection:** Implemented using a custom container for managing dependencies.
* **Routing:** Custom routing mechanism to map URLs to controllers and actions.
* **JavaScript:** Used for sending PUT and DELETE requests for task updates and deletions.## API Routes
The following table describes the available API routes:
| Method | Route | Controller | Action | Description |
| :----- | :---------------- | :----------------- | :-------- | :------------------------------------------------------------------------------- |
| GET | `/` | HomeController | index | Renders the home page (landing page or task list - based on your implementation). |
| GET | `/signup` | HomeController | signup | Renders the signup form. |
| GET | `/signin` | HomeController | signIn | Renders the sign-in form. |
| POST | `/signup` | UserController | signup | Processes user registration. |
| POST | `/signin` | UserController | signIn | Processes user login. |
| GET | `/tasks` | TodoController | index | Retrieves a list of all tasks for the authenticated user. |
| GET | `/task/{id}` | TodoController | getTask | Retrieves details of a specific task by ID. |
| GET | `/api/tasks` | TaskService | showAll | Retrieves all tasks. |
| GET | `/api/task/{id}` | TaskService | getTask | Retrieves details of a specific task by ID. |
| POST | `/api/task` | TodoController | addTask | Creates a new task. |
| DELETE | `/api/task` | TodoController | deleteTask| Deletes a task (requires task ID in the request body). |
| PUT | `/api/task/{id}` | TodoController | editTask | Updates an existing task. |## Installation and Setup
1. **Clone the repository:** `git clone https://github.com/ramo4040/ToDo-List-application-PHP.git`
2. **Configure database connection:** Update the database credentials in the `Database - Config` class.
3. **Run the application:** Use a PHP built-in server or configure a web server like Apache or Nginx.## Usage
1. Access the application in your browser. http://localhost/todo/
2. Sign up or sign in to access the ToDo list features.
3. Create, view, edit, and delete tasks as needed.## Contributing
Contributions are welcome! Please feel free to fork the repository and submit pull requests for bug fixes, improvements, or new features.
## Contact