Skip to content

About

SDD Capstone Project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project Title

A full-stack web application built with Laravel as the backend API and Next.js as the frontend application.

The project follows a separated frontend/backend architecture, providing scalable API-driven communication between Laravel and Next.js.

πŸš€ Features

  • Laravel Backend: RESTful APIs, business logic, authentication, database management, and server-side processing.
  • Next.js Frontend: Responsive UI, routing, server/client-side rendering, and API integration.
  • Authentication & Authorization: Secure user authentication and role/permission-based access where applicable.
  • Database Management: Laravel migrations, seeders, and Eloquent ORM.
  • API Integration: Structured communication between the Next.js frontend and Laravel backend.
  • Validation & Error Handling: Backend and frontend validation with standardized API responses.
  • Testing: Automated backend and frontend test coverage.
  • Scalable Architecture: Modular structure designed for future feature enhancements.

πŸ› οΈ Technology Stack

Backend

  • PHP >= 8.2
  • Laravel
  • MySQL
  • Composer
  • Laravel Sanctum / Authentication (if applicable)

Frontend

  • Node.js >= 20
  • Next.js
  • React
  • TypeScript
  • npm

Development Tools

  • Git
  • GitHub
  • Postman / API testing tool
  • VS Code or equivalent IDE

πŸ“ Project Structure

project-root/
β”‚
β”œβ”€β”€ backend/                 # Laravel API
β”‚   β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ bootstrap/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ storage/
β”‚   β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ .env
β”‚   └── composer.json
β”‚
β”œβ”€β”€ frontend/                # Next.js application
β”‚   β”œβ”€β”€ app/                 # or pages/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ .env.local
β”‚   └── package.json
β”‚
β”œβ”€β”€ README.md
└── .gitignore

πŸš€ Getting Started

Follow the steps below to set up the project locally.

Prerequisites

Make sure the following are installed:

  • PHP >= 8.2
  • Composer >= 2.x
  • MySQL >= 8.x
  • Node.js >= 20.x
  • npm >= 10.x
  • Git

Verify your installation:

php -v
composer -V
mysql --version
node -v
npm -v
git --version

πŸ”§ Backend Setup – Laravel

1. Clone the Repository

git clone <repository-url>
cd <project-name>

2. Navigate to Backend

cd backend

3. Install PHP Dependencies

composer install

4. Configure Environment

Copy the example environment file:

cp .env.example .env

For Windows:

copy .env.example .env

Update the .env file with the required configuration:

APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=root
DB_PASSWORD=

5. Generate Application Key

php artisan key:generate

6. Run Database Migrations

php artisan migrate

If seed data is required:

php artisan db:seed

Or:

php artisan migrate --seed

7. Create Storage Link

php artisan storage:link

8. Start Laravel Server

php artisan serve

The backend will normally be available at:

http://localhost:8000

🎨 Frontend Setup – Next.js

Open a new terminal.

1. Navigate to Frontend

cd frontend

2. Install Dependencies

npm install

3. Configure Environment

Create .env.local:

NEXT_PUBLIC_API_URL=http://localhost:8000/api

Add any additional environment variables required by the application.

4. Start Development Server

npm run dev

The frontend will normally be available at:

http://localhost:3000

πŸ”— Frontend & Backend Integration

The Next.js application communicates with Laravel through REST APIs.

Example:

Next.js
   β”‚
   β”‚ HTTP Request
   β–Ό
Laravel API
   β”‚
   β–Ό
MySQL Database

Example API configuration:

NEXT_PUBLIC_API_URL=http://localhost:8000/api

Example API endpoint:

GET /api/users
POST /api/login
GET /api/products

The exact API endpoints should be documented based on the project's API specification.


πŸ’» Usage

Start Backend

cd backend
php artisan serve

Start Frontend

cd frontend
npm run dev

For production builds:

Laravel

php artisan optimize

Next.js

npm run build
npm run start

πŸ§ͺ Running Tests

Laravel Tests

cd backend
php artisan test

Or:

./vendor/bin/phpunit

Next.js Tests

cd frontend
npm run test

If the project uses a specific testing framework such as Jest or Playwright, use the corresponding project-defined command.


🧹 Code Quality

Before creating a Pull Request, ensure the code passes the project's configured linting and formatting checks.

Next.js

npm run lint

Laravel

If Laravel Pint is configured:

./vendor/bin/pint

🌿 Branching & Git Workflow

The repository follows a feature-based Git workflow.

Main Branch

main

The main branch contains stable, production-ready code.

Feature Branches

Create a separate branch for each feature or task:

git checkout -b feature/user-authentication

Examples:

feature/user-authentication
feature/dashboard
feature/payment-integration
fix/login-validation
fix/api-response
refactor/user-service

Development Workflow

feature branch
      β”‚
      β–Ό
Development
      β”‚
      β–Ό
Testing
      β”‚
      β–Ό
Pull Request
      β”‚
      β–Ό
Code Review
      β”‚
      β–Ό
main

Commit Changes

git add .
git commit -m "Add user authentication"

Push Branch

git push origin feature/user-authentication

Create a Pull Request targeting:

main

πŸ” Environment & Security

Do not commit sensitive environment variables or credentials.

The following files should generally remain outside Git:

.env
.env.local
.env.production

Never commit:

  • Database passwords
  • API keys
  • Access tokens
  • JWT secrets
  • Third-party credentials
  • Production credentials

Use .env.example to document required environment variables.


πŸ“‹ Pull Request Checklist

Before submitting a Pull Request:

  • Code follows project coding standards.
  • Feature/functionality has been tested locally.
  • Backend API changes have been tested.
  • Frontend integration has been tested.
  • Database migrations are included where required.
  • Environment variables are documented in .env.example.
  • No sensitive credentials are committed.
  • Tests are passing.
  • Lint/formatting checks are passing.
  • PR description clearly explains the changes.

🀝 Contributing

  1. Create a feature/fix branch from main.
git checkout main
git pull origin main
git checkout -b feature/your-feature
  1. Implement your changes.

  2. Test the changes locally.

  3. Commit your changes.

git add .
git commit -m "Add your change description"
  1. Push your branch.
git push origin feature/your-feature
  1. Create a Pull Request targeting main.

  2. Address review comments and merge after approval.


πŸ“„ License

This project is licensed under the MIT License.

See the LICENSE file for details.


πŸ‘₯ Project Contact

Project: Project Name Repository: <GitHub Repository URL> Maintained By: <Team / Organization Name>

For project-related issues or feature requests, create a GitHub Issue or contact the project maintainers.

About

SDD Capstone Project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors