Sellit is a REST API clone of a popular listing website in Nigeria called jiji.ng
- Development Requirements
- Installation
- Starting Devevelopment Server
- Documentation
- Testing
This application currently runs on Laravel 9.20 and the development requirements to get this application up and running are as follow:
- PHP 8.1+
- Sqlite
- NPM
- MySQL
- git
- Composer
git clone https://github.com/ayodeleoniosun/sellit.git
cd sellit
composer install
npm install
- Copy
.env.example
to.env
i.ecp .env.example .env
- Update all the variables as needed
php artisan key:generate
php artisan migrate:fresh --seed
Ensure that your mysql server is up before running the above command
After the installation of the packages and running migrations, then, it's time to start the development server.
Development server can be started in three ways:
- Using
php artisan serve
- Using Valet
- Docker via Laravel sail
I recommend using valet or Laravel sail to start the development server to ensure that the application works perfectly across all developers' machines regardless of their operating systems.
- If you are using Laravel sail to start your development server, your default database configuration in the .env should be as follow:
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=sail
DB_PASSWORD=password
However, if you want to change the DB username and password after springing forth a docker container using the laravel sail, update the DB_USERNAME and DB_PASSWORD in the .env with the new details and then run this:
./vendor/bin/sail down -v
./vendor/bin/sail build --no-cache
./vendor/bin/sail up -d
The Postman API collection is available Here.
You must have installed Pest in the project before running the test suites. If you haven't, kindly follow the
documentation Here.
The application is currently made up of feature tests and only the RESTful endpoints were tested.
The tests
can be run using:
./vendor/bin/pest