This is the backend API for the Movie Quotes application. The API provides endpoints for users to interact with the front-end application.
Users can:
- Register and authorize themselves, including via Google registration
- Browse through a collection of movie quotes
- Like or comment on quotes
- Add their own quotes from their movies
- Manage their personal page for movies - delete/edit/add movie or quote
- Update their profile details, such as changing their username or adding/changing their profile picture
- PHP@ 8.2.5
- MYSQL@ 8.0.32
- [email protected]
- [email protected]
- [email protected]
- [email protected] - Back-end framework
- Spatie Translatable - Package for translation
- tailwindcss - CSS framework
- Laravel Sanctum - Authentication
- Swagger - API documentation
- Laravel Socialite - Social authentication
- Laravel Broadcasting - Real-time notifications
1.First of all, clone the Movie Quotes repository from GitHub:
https://github.com/RedberryInternship/elene-javakhishvili-movie-quotes-back.git
2.Install dependencies:
composer install
3.After you have installed all the PHP dependencies, it's time to install all the JS dependencies:
npm install
and also:
npm run dev
4.Now we need to set our env file. Go to the root of your project and execute this command.
cp .env.example .env
5.Generate a new application key
php artisan key:generate
6.Link the storage
php artisan storage:link
7.Update the .env file with your database credentials:
MYSQL:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=*****
DB_USERNAME=*****
DB_PASSWORD=*****
Gmail SMTP:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=*****
MAIL_PASSWORD=*****
MAIL_ENCRYPTION=ssl
MAIL_FROM_NAME=*****
Credentials for OAuth provider
GOOGLE_CLIENT_ID=*****
GOOGLE_CLIENT_SECRET=*****
GOOGLE_REDIRECT=*****
Pusher Channels credentials
PUSHER_APP_ID=your-pusher-app-id
PUSHER_APP_KEY=your-pusher-key
PUSHER_APP_SECRET=your-pusher-secret
PUSHER_APP_CLUSTER=mt1
Others
APP_URL=your-url
SESSION_DOMAIN=
FRONTEND_URL=frontend-url
SANCTUM_STATEFUL_DOMAINS=stateful-domains
BROADCAST_DRIVER=pusher
if you've completed getting started section, then migrating database if fairly simple process, just execute:
php artisan migrate
You can run Laravel's built-in development server by executing:
php artisan serve
npm run dev
See the Diagram