https://github.com/dconco/social-media-app
I created this social media website with PhpSlides.
https://github.com/dconco/social-media-app
Last synced: 11 months ago
JSON representation
I created this social media website with PhpSlides.
- Host: GitHub
- URL: https://github.com/dconco/social-media-app
- Owner: dconco
- License: mit
- Created: 2024-08-06T12:36:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T20:47:17.000Z (almost 2 years ago)
- Last Synced: 2024-08-16T21:52:44.486Z (almost 2 years ago)
- Language: PHP
- Size: 1.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PhpSlides
Welcome to PhpSlides!
This framework is a PHP revolution,
designed to provide a simple and scalable structure for developing full-stack web applications
using the Model-View-Controller (MVC) architectural pattern.
With PhpSlides, you can write HTML, CSS, and JavaScript in a PHP-like way,
streamlining the development process and enhancing productivity.
## Table of Contents
- [PhpSlides](#phpslides)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Install with Composer](#install-with-composer)
- [Or Clone the Repository](#or-clone-the-repository)
- [Configuration](#configuration)
- [.env](#env)
- [phpslides.config.json](#phpslidesconfigjson)
- [Syntax](#syntax)
- [Creating Web Layouts](#creating-web-layouts)
- [Styling Web Layouts](#styling-web-layouts)
- [Creating Web Routes](#creating-web-routes)
- [Creating API Routes](#creating-api-routes)
- [Directory Structure](#directory-structure)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)
- [Financial Support](#financial-support)
## Introduction
PhpSlides is a lightweight, easy-to-use full-stack framework that helps you build web applications quickly and efficiently.
It follows the MVC architectural pattern, separating the application logic into models, views, and controllers to promote code organization and reusability.
Additionally, it provides the capability to write HTML, CSS, and JavaScript in a PHP-like way, making it easier to manage and maintain your front-end and back-end code together.
## Features
- **Full-Stack Development**: Seamlessly integrate front-end and back-end development by writing HTML, CSS, and JavaScript in a PHP-like syntax.
- **Simple Routing**: Easily define routes and map them to controllers and actions.
- **Modular Structure**: Organized directory structure for models, views, controllers, and other components.
- **Database Abstraction**: Simple and flexible database handling with a query builder.
- **Middleware Support**: Add middleware to handle authentication, logging, and other tasks.
- **Event Handling**: Built-in event handling system for managing application events.
- **Service Providers**: Easily manage and configure services like email, payment, caching, etc.
## Requirements
- PHP 8.2 or higher
- Composer
- A web server (e.g., Apache, Nginx)
## Installation
### Install with Composer
```bash
composer create-project phpslides/phpslides ProjectName
cd ProjectName
```
### Or Clone the Repository
1. **Clone the repository:**
```bash
git clone https://github.com/phpslides/phpslides.git
cd phpslides
```
2. **Install dependencies:**
```bash
composer install
```
3. **Set up the web server:**
Point your web server to the document root.
4. **Configure the environment:**
If the .env file does not exist, copy the env example configuration file and update it with your settings:
```bash
cp .env.example .env
```
## Configuration
### .env
Edit the .env file to configure database settings, application settings, and other configurations.
```bash
APP_NAME=PhpSlides
APP_SERVER=localhost
APP_URL=http://localhost
APP_DEBUG=true
```
### phpslides.config.json
```json
{
"public": {
"/": ["*"],
"assets": ["*"],
"images": ["image"],
"videos": ["video"],
"audios": ["audio"],
"styles": ["css", "scss", "sass"],
"css": ["css", "scss", "sass"],
"src": ["js", "ts", "css", "scss", "sass"],
"png": ["png"],
"jpg": ["jpg"],
"svg": ["svg"]
},
"charset": "UTF-8"
}
```
## Syntax
### Creating Web Layouts
```php
root([
['id' => 'root'],
Tag::Container([],
Tag::Input(['type' => 'text'], '$$name')
Tag::Text([], 'Hello $$name')
)
]);
DOM::render('app');
?>
```
### Styling Web Layouts
```php
[
Style::Size => Screen::100,
Style::BackgroundImage => asset('bg.png'),
],
'TextStyle' => [
Style::Color => Color::White,
Style::FontSize => Font::Base,
Style::FontWeight => Font::Bold
]
]);
export($style, 'AppStyle');
?>
```
### Creating Web Routes
```php
action('Controller::method')
->name('index');
?>
```
### Creating API Routes
```php
define('/user', 'UserController')
->map([
'/' => [GET, '@index'],
'/{id}' => [GET, '@show'],
])
->name('user');
$user_id_route = route('user::1');
?>
```
## Directory Structure
Here's an overview of the project directory structure:
project_root/
├── app/
│ ├── Controllers/
│ ├── Middlewares/
│ ├── Models/
├── public/
├── src/
│ ├── bootstrap/
│ ├── configs/
│ ├── resources/
│ │ └── views/
│ │ └── errors/
├── vendor/
├── .env
├── .env.example
├── .htaccess
├── composer.json
├── LICENSE
├── phpslides.config.json
└── README.md
├── slide
## Documentation
For detailed documentation, including advanced usage,
API references, and more, please visit our [documentation website](#).
## Contributing
We welcome contributions from the community!
If you'd like to contribute,
please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b name/your-feature).
- Commit your changes (git commit -am 'Add a new feature').
- Push to the branch (git push origin name/your-feature).
- Create a new Pull Request.
## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/PhpSlides/phpslides/blob/master/LICENSE) file for more details.
## Financial Support
Your contributions help us maintain and improve PhpSlides.
If you find PhpSlides useful, please consider supporting us financially.
Every bit of support goes a long way in ensuring we can continue to develop and enhance the framework.
[Support Now!](https://buymeacoffee.com/dconco)