mathieulepuil / symfony-saas-boilerplate
Template for Symfony-based SaaS projects
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=8.2
- ext-ctype: *
- ext-iconv: *
- doctrine/doctrine-bundle: ^2.11
- doctrine/doctrine-migrations-bundle: ^3.3
- doctrine/orm: ^2.17
- knpuniversity/oauth2-client-bundle: ^2.17
- league/oauth2-github: ^3.1
- league/oauth2-google: ^4.0
- omines/oauth2-gitlab: ^3.6
- symfony/console: 7.0.*
- symfony/dotenv: 7.0.*
- symfony/flex: ^2
- symfony/form: 7.0.*
- symfony/framework-bundle: 7.0.*
- symfony/runtime: 7.0.*
- symfony/security-bundle: 7.0.*
- symfony/validator: 7.0.*
- symfony/webpack-encore-bundle: ^2.1
- symfony/yaml: 7.0.*
- wohali/oauth2-discord-new: ^1.2
Requires (Dev)
- symfony/maker-bundle: ^1.52
- symfony/stopwatch: 7.0.*
- symfony/web-profiler-bundle: 7.0.*
Conflicts
README
This repository is a Symfony 7 template with all the basic elements needed to start a project. The project includes :
- Symfony 7.0.1
- TailwindCSS
- Registration via form
- Registration via oauth
- Connection via form
- Connection via oauth
Table of contents :
Presentation
The template contains a single entity: User with the following properties:
- id
- roles
- password
- firstname
- lastname
- username
- profile_picture
- oauth
Account connection is managed in the SecurityController
and is accessed via the /login
route. In the case of registration, the route is /signup
.
Connection can be made via the form on the site or via one of the following social networks:
- Discord
- Github
- Gitlab
You can add more oauth by following the KnpU documentation.
You can also delete them by following this procedure:
- Delete the
{platform}Connect
and{platform}ConnectCheck
functions in theSecurityController
. - Delete the configuration lines in
config/packages/knpu_oauth2_client.yaml
. - Delete application data in
.env
(or .env.local)
Installation
Prerequisites :
- PHP 8.2.0 or higher
- Composer
- Symfony CLI
- NodeJS
If you have all the prerequisites, you can start the installation.
- Clone the repository or download the zip
- Open your project in your IDE
- Open a terminal and type
composer install
. - Open a terminal and type
npm install
. - Set up your .env.local with your database information
- Open a terminal and type
php bin/console doctrine:database:create
. - Open a terminal and type
php bin/console doctrine:schema:update --force
. - Set up your .env.local with your oauth credentials
OAuth
To use oauth, you need to create an application on the following platforms:
Project by Mathieu Le Puil - My Website - Contact me - My Twitter - My LinkedIn