Skip to content

Commit 95945fb

Browse files
committed
feat: Add README with project-specific information and features
1 parent 8b4f46c commit 95945fb

11 files changed

Lines changed: 165 additions & 115 deletions

File tree

README.md

Lines changed: 138 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,160 @@
1-
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
1+
# Busly
22

3-
<p align="center">
4-
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8-
</p>
3+
This is the backend of the Busly project, a bus reservation application.
4+
It was created to help people book bus trips across multiple cities in a more organized and efficient way.
95

10-
## About Laravel
6+
## Installation
117

12-
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
8+
Busly backend is a Laravel application; it's built on top of Laravel 12 and uses a MySQL database.
9+
It's recommended to use Laravel Sail to run the application, but you can also run it locally if you have MySQL installed.
1310

14-
- [Simple, fast routing engine](https://laravel.com/docs/routing).
15-
- [Powerful dependency injection container](https://laravel.com/docs/container).
16-
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17-
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18-
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19-
- [Robust background job processing](https://laravel.com/docs/queues).
20-
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
11+
1. **Clone the repository:**
12+
```bash
13+
git clone https://github.com/your-username/busly.git
14+
cd busly
15+
```
2116

22-
Laravel is accessible, powerful, and provides tools required for large, robust applications.
17+
2. **Run Sail to start the development server:**
18+
```bash
19+
./vendor/bin/sail up -d
20+
./vendor/bin/sail shell
21+
```
2322

24-
## Learning Laravel
23+
3. **Install PHP dependencies:**
24+
```bash
25+
composer install
26+
```
2527

26-
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
28+
4. **Install Node.js dependencies:**
29+
```bash
30+
npm install
31+
```
2732

28-
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
33+
5. **Copy the example environment file and generate an application key:**
34+
```bash
35+
cp .env.example .env
36+
php artisan key:generate
37+
```
2938

30-
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
39+
5. **Run migrations and sedders:**
40+
```bash
41+
php artisan migrate
42+
php artisan db:seed
43+
```
3144

32-
## Laravel Sponsors
45+
## Packages
3346

34-
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
47+
### For Production
3548

36-
### Premium Partners
49+
**inertiajs/inertia-laravel**
50+
Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
3751

38-
- **[Vehikl](https://vehikl.com)**
39-
- **[Tighten Co.](https://tighten.co)**
40-
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
41-
- **[64 Robots](https://64robots.com)**
42-
- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
43-
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
44-
- **[Redberry](https://redberry.international/laravel-development)**
45-
- **[Active Logic](https://activelogic.com)**
52+
**tightenco/ziggy**
53+
Ziggy provides a JavaScript route() helper function that works like Laravel's, making it easy to use your Laravel named routes in JavaScript.
4654

47-
## Contributing
55+
**laravel/telescope**
56+
Telescope provides insight into the requests coming into your application, exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps, and more.
4857

49-
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
58+
### For Development
5059

51-
## Code of Conduct
60+
**Laravel Sail**
61+
Laravel Sail is a light-weight command-line interface for interacting with Laravel's default Docker development environment.
5262

53-
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
63+
**Pest**
64+
Pest is a testing framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
5465

55-
## Security Vulnerabilities
66+
**Larastan**
67+
Larastan focuses on finding errors in your code. It catches whole classes of bugs even before you write tests for the code.
5668

57-
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
69+
**Laravel Pint**
70+
Laravel Pint is an opinionated PHP code style fixer for minimalists.
71+
72+
**Rector**
73+
Rector instantly upgrades and refactors the PHP code of your application.
74+
75+
## Features
76+
77+
- **City Management**: Add and manage cities for bus routes
78+
- **Bus Fleet Management**: Manage buses with different types and capacities
79+
- **Trip Scheduling**: Create and manage bus trips between cities
80+
- **Reservation System**: Allow users to book seats on available trips
81+
- **User Dashboard**: Users can view their reservations and trip history
82+
- **Admin Dashboard**: Comprehensive admin panel for managing the entire system
83+
- **Role-based Access Control**: Separate access levels for users and administrators
84+
85+
## Screenshots
86+
87+
### User Interface
88+
89+
#### Home Page
90+
The main landing page where users can search for available trips.
91+
92+
![User Home](screenshots/user-home.png)
93+
94+
#### Trip Booking
95+
Users can view trip details and book their seats with an intuitive booking interface.
96+
97+
![User Booking](screenshots/user-book.png)
98+
99+
#### User Trip Management
100+
Users can view and manage their booked trips and reservation history.
101+
102+
![User Trips](screenshots/user-trips.png)
103+
104+
### Admin Interface
105+
106+
#### Admin Dashboard
107+
Comprehensive dashboard providing overview of system statistics and key metrics.
108+
109+
![Admin Dashboard](screenshots/admin-dashboard.png)
110+
111+
#### Trip Management
112+
Admin interface for managing all trips in the system.
113+
114+
![Admin Trips](screenshots/admin-trips.png)
115+
116+
#### Trip Creation Form
117+
Detailed form for creating and editing trip information.
118+
119+
![Admin Trip Form](screenshots/admin-trips-form.png)
120+
121+
#### System Alerts
122+
Admin panel for monitoring system alerts and notifications.
123+
124+
![Admin Alerts](screenshots/admin-alerts.png)
125+
126+
## Testing
127+
128+
To run all tests, use the following command:
129+
```bash
130+
composer test
131+
```
132+
133+
To run specific test suites:
134+
135+
```bash
136+
# Run PHPStan static analysis
137+
composer test:types
138+
139+
# Run Pest unit tests
140+
composer test:unit
141+
142+
# Run Rector tests
143+
composer test:rector
144+
145+
# Apply Rector changes
146+
composer rector
147+
148+
# Run code style tests
149+
composer test:lint
150+
151+
# Fix code style
152+
composer lint
153+
154+
# Run type coverage tests
155+
composer test:type-coverage
156+
```
58157

59158
## License
60159

61-
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
160+
This project is licensed under the MIT License. See the LICENSE file for details.

resources/js/components/app-logo.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import AppLogoIcon from './app-logo-icon';
2-
31
export default function AppLogo() {
42
return (
53
<>
64
<div className="flex aspect-square size-8 items-center justify-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground">
7-
<AppLogoIcon className="size-5 fill-current text-white dark:text-black" />
85
</div>
96
<div className="ml-1 grid flex-1 text-left text-sm">
10-
<span className="mb-0.5 truncate leading-tight font-semibold">Laravel Starter Kit</span>
7+
<span className="mb-0.5 truncate leading-tight font-semibold">Busly</span>
118
</div>
129
</>
1310
);

resources/js/components/app-sidebar.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { NavFooter } from '@/components/nav-footer';
21
import { NavMain } from '@/components/nav-main';
32
import { NavUser } from '@/components/nav-user';
43
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
54
import { type NavItem, type SharedData } from '@/types';
65
import { Link, usePage } from '@inertiajs/react';
7-
import { BookOpen, Bus, Calendar, Folder, LayoutGrid, MapPin, Route, Shield, Ticket, Users } from 'lucide-react';
6+
import { Bus, Calendar, LayoutGrid, MapPin, Route, Ticket, Users } from 'lucide-react';
87
import AppLogo from './app-logo';
98

109
const getMainNavItems = (isAdmin: boolean): NavItem[] => {
@@ -58,19 +57,6 @@ const getMainNavItems = (isAdmin: boolean): NavItem[] => {
5857
return items;
5958
};
6059

61-
const footerNavItems: NavItem[] = [
62-
{
63-
title: 'Repository',
64-
href: 'https://github.com/laravel/react-starter-kit',
65-
icon: Folder,
66-
},
67-
{
68-
title: 'Documentation',
69-
href: 'https://laravel.com/docs/starter-kits#react',
70-
icon: BookOpen,
71-
},
72-
];
73-
7460
export function AppSidebar() {
7561
const { auth } = usePage<SharedData>().props;
7662
const isAdmin = auth.user.role === 'admin';
@@ -95,7 +81,6 @@ export function AppSidebar() {
9581
</SidebarContent>
9682

9783
<SidebarFooter>
98-
<NavFooter items={footerNavItems} className="mt-auto" />
9984
<NavUser />
10085
</SidebarFooter>
10186
</Sidebar>

resources/js/pages/welcome.tsx

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ export default function Welcome() {
4141
<div className="flex w-full items-center justify-center opacity-100 transition-opacity duration-750 lg:grow starting:opacity-0">
4242
<main className="flex w-full max-w-[335px] flex-col-reverse lg:max-w-4xl lg:flex-row">
4343
<div className="flex-1 rounded-br-lg rounded-bl-lg bg-white p-6 pb-12 text-[13px] leading-[20px] shadow-[inset_0px_0px_0px_1px_rgba(26,26,0,0.16)] lg:rounded-tl-lg lg:rounded-br-none lg:p-20 dark:bg-[#161615] dark:text-[#EDEDEC] dark:shadow-[inset_0px_0px_0px_1px_#fffaed2d]">
44-
<h1 className="mb-1 font-medium">Let's get started</h1>
44+
<h1 className="mb-1 font-medium">Welcome to Busly</h1>
4545
<p className="mb-2 text-[#706f6c] dark:text-[#A1A09A]">
46-
Laravel has an incredibly rich ecosystem.
46+
Your reliable bus reservation system.
4747
<br />
48-
We suggest starting with the following.
48+
Book your next journey with ease and comfort.
4949
</p>
5050
<ul className="mb-4 flex flex-col lg:mb-6">
5151
<li className="relative flex items-center gap-4 py-2 before:absolute before:top-1/2 before:bottom-0 before:left-[0.4rem] before:border-l before:border-[#e3e3e0] dark:before:border-[#3E3E3A]">
@@ -55,28 +55,7 @@ export default function Welcome() {
5555
</span>
5656
</span>
5757
<span>
58-
Read the
59-
<a
60-
href="https://laravel.com/docs"
61-
target="_blank"
62-
className="ml-1 inline-flex items-center space-x-1 font-medium text-[#f53003] underline underline-offset-4 dark:text-[#FF4433]"
63-
>
64-
<span>Documentation</span>
65-
<svg
66-
width={10}
67-
height={11}
68-
viewBox="0 0 10 11"
69-
fill="none"
70-
xmlns="http://www.w3.org/2000/svg"
71-
className="h-2.5 w-2.5"
72-
>
73-
<path
74-
d="M7.70833 6.95834V2.79167H3.54167M2.5 8L7.5 3.00001"
75-
stroke="currentColor"
76-
strokeLinecap="square"
77-
/>
78-
</svg>
79-
</a>
58+
Search and book trips across multiple cities
8059
</span>
8160
</li>
8261
<li className="relative flex items-center gap-4 py-2 before:absolute before:top-0 before:bottom-1/2 before:left-[0.4rem] before:border-l before:border-[#e3e3e0] dark:before:border-[#3E3E3A]">
@@ -86,41 +65,31 @@ export default function Welcome() {
8665
</span>
8766
</span>
8867
<span>
89-
Watch video tutorials at
90-
<a
91-
href="https://laracasts.com"
92-
target="_blank"
93-
className="ml-1 inline-flex items-center space-x-1 font-medium text-[#f53003] underline underline-offset-4 dark:text-[#FF4433]"
94-
>
95-
<span>Laracasts</span>
96-
<svg
97-
width={10}
98-
height={11}
99-
viewBox="0 0 10 11"
100-
fill="none"
101-
xmlns="http://www.w3.org/2000/svg"
102-
className="h-2.5 w-2.5"
103-
>
104-
<path
105-
d="M7.70833 6.95834V2.79167H3.54167M2.5 8L7.5 3.00001"
106-
stroke="currentColor"
107-
strokeLinecap="square"
108-
/>
109-
</svg>
110-
</a>
68+
Manage your reservations and travel history
11169
</span>
11270
</li>
11371
</ul>
11472
<ul className="flex gap-3 text-sm leading-normal">
115-
<li>
116-
<a
117-
href="https://cloud.laravel.com"
118-
target="_blank"
119-
className="inline-block rounded-sm border border-black bg-[#1b1b18] px-5 py-1.5 text-sm leading-normal text-white hover:border-black hover:bg-black dark:border-[#eeeeec] dark:bg-[#eeeeec] dark:text-[#1C1C1A] dark:hover:border-white dark:hover:bg-white"
120-
>
121-
Deploy now
122-
</a>
123-
</li>
73+
{!auth.user && (
74+
<li>
75+
<Link
76+
href={route('register')}
77+
className="inline-block rounded-sm border border-black bg-[#1b1b18] px-5 py-1.5 text-sm leading-normal text-white hover:border-black hover:bg-black dark:border-[#eeeeec] dark:bg-[#eeeeec] dark:text-[#1C1C1A] dark:hover:border-white dark:hover:bg-white"
78+
>
79+
Get Started
80+
</Link>
81+
</li>
82+
)}
83+
{auth.user && (
84+
<li>
85+
<Link
86+
href={route('user.trips.index')}
87+
className="inline-block rounded-sm border border-black bg-[#1b1b18] px-5 py-1.5 text-sm leading-normal text-white hover:border-black hover:bg-black dark:border-[#eeeeec] dark:bg-[#eeeeec] dark:text-[#1C1C1A] dark:hover:border-white dark:hover:bg-white"
88+
>
89+
Browse Trips
90+
</Link>
91+
</li>
92+
)}
12493
</ul>
12594
</div>
12695
<div className="relative -mb-px aspect-[335/376] w-full shrink-0 overflow-hidden rounded-t-lg bg-[#fff2f2] lg:mb-0 lg:-ml-px lg:aspect-auto lg:w-[438px] lg:rounded-t-none lg:rounded-r-lg dark:bg-[#1D0002]">

screenshots/admin-alerts.png

326 KB
Loading

screenshots/admin-dashboard.png

659 KB
Loading

screenshots/admin-trips-form.png

399 KB
Loading

screenshots/admin-trips.png

434 KB
Loading

screenshots/user-book.png

387 KB
Loading

screenshots/user-home.png

477 KB
Loading

0 commit comments

Comments
 (0)