Skip to content

jvngarcia/devathon-8-backend

Repository files navigation

TEAM1 ED8: Santa's Workshop API

This repository contains a base Laravel 11 project that implements a backend system for managing Christmas gift deliveries, children's lists, and elf operations.

Requirements

  • PHP >= 8.2
  • Composer
  • Node.js >= 18.x
  • npm or yarn
  • MySQL >= 8.0 (or your preferred database)
  • Git

Installation

  1. Clone the repository
git clone <repository-url>
cd <project-folder>
  1. Install PHP dependencies
composer install
  1. Install frontend dependencies
npm install
# or using yarn
yarn install
  1. Environment Setup
# Copy the example environment file
cp .env.example .env

# Generate application key
php artisan key:generate
  1. Configure your .env file with your database credentials and other necessary settings
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password
  1. Run database migrations
php artisan migrate
  1. Create API KEY
API_KEY=your_api_key

Running the Application

  1. Start the development server
php artisan serve
  1. Compile frontend assets
# For development
npm run dev
# or
yarn dev

# For production
npm run build
# or
yarn build

Your application should now be running at http://localhost:8000

Migations commands

  • Run all migrations
php artisan migrate
  • Rollback latest migration
php artisan migrate:rollback
  • Re-create database
php artisan migrate:refresh
  • Rollback all migrations
php artisan migrate:reset

Documentation Commands

php artisan l5-swagger:generate

Additional Commands

  • Clear application cache
php artisan cache:clear
  • Clear configuration cache
php artisan config:clear
  • Run tests
php artisan test

Development Standards

  • Follow PSR-12 coding standards
  • Write meaningful commit messages
  • Use git flow for branching
  • Create feature branches for new development
  • Write tests for new features

Troubleshooting

If you encounter any issues:

  1. Ensure all dependencies are installed correctly
  2. Verify your PHP version meets the requirements
  3. Make sure your database service is running
  4. Check the Laravel logs in storage/logs
  5. Clear all caches:
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear

Documentation

PHPDoc

Open the file doc/index.html

Swagger

Execute php artisan serve Open http://localhost:8000/api/documentation

Postman

Open https://documenter.getpostman.com/view/18337636/2sAYBVgBVU

Database structure

image

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages