-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is the PHP server used to host and run the concept social media platform dubbed "Community"
The 'Community' Project is a concept social media platform I am working on. It serves for me to enhance my skills in all aspects of the development stages, and tech stacks.
This and the Community App will serve as the foundation for this project.
The Community Server will house database configuration, models, authentication and logic required to run the application. It is written in PHP, using the Laravel Framework.
The server comprises of the following tools and frameworks:
- PHP 7.x
- Laravel 5.7+
- Laravel Passport
- PostgreSQL 11
- Lighthouse GraphQL 3
To setup the server please follow the instructions below
- Clone repository.
- install composer using
composer install
- run
php artisan key:generate
to generate keys - run
php artisan migrate:fresh --seed
to seed the database (after environment configuration)
- The default user details are:
username: test
email: test@tester.com
password: secret
If you want to change this, edit UserTableSeeder.php
5. run php artisan passport:install 6. take the Password Grant Token Client details and add them to your
.envfile. 7. Done. visit
/graphql-playground` to mess around with the schema.
Laravel GraphQL uses Passport auth tokens to give access. Currently all GraphQL queries require authorization. Make sure after logging in, to add the following header to your requests:
{
"Authorization": "Bearer ...token"
}
Below is an image of the database Schema. right now it isn't much, but will grow to fully accomplish what the app will be able to do