Skip to content

📚 This web application was created to learn about how to work with REST APIs using Symfony, MySQL, API Documentation, Migrations, Entities, Serialization, Auth, and other Symfony components.

Notifications You must be signed in to change notification settings

Giorgio163/job-board-api

Repository files navigation

JOB-BOARD-API

The Job Board API is a RESTful API developed with Symfony for managing companies, job postings, applicants, and job applications. Users can sign up and log in to use the various routes, including creating, reading, updating, and deleting, as well as searching and filtering job postings. The API offers user authentication, input data validation, and quality tools such as PHPStan and PHPCodeSniffer.

Requirements

Install

  1. Clone the repository:

    git clone https://github.com/Giorgio163/job-board-api.git
     # or
    git clone https://gitlab.com/TiPhOoN/job-board-api.git
    
  2. Access the directory:

    cd job-board-api
    
  3. Install the Composer dependencies:

    composer install
    
  4. Go to MySQL and create the database job-board-api.

  5. Create a file .env.local and add your database connection. Example:

    DATABASE_URL="mysql://root:@localhost:3306/job-board-api"
  6. Create the tables:

    php bin/console doctrine:migrations:migrate
    
  7. Run the application:

    symfony server:start
    # or
    php -S localhost:8000 -t public
  8. Go to http://localhost:8000

To generate the jwt keys, run the following command: docker-compose run -it php-fpm php bin/console lexik:jwt:generate-keypair.

Routes

To access the API documentation, go to http://localhost:8000/api/doc. Swagger

Quality Tools

You can run PHP codesniffer to check the code quality and PHPStan for static analysis.

Code Style

Install PHP codesniffer:

composer require squizlabs/php_codesniffer

Run PHP codesniffer:

./vendor/bin/phpcs --standard=PSR12 src/

Static Analyze

Install PHPStan:

composer require --dev phpstan/phpstan

Run PHPStan:

vendor/bin/phpstan analyse src

Learn More

To know more about the development of Symfony applications, check the official documentation.

About

📚 This web application was created to learn about how to work with REST APIs using Symfony, MySQL, API Documentation, Migrations, Entities, Serialization, Auth, and other Symfony components.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published