Welcome to the Figured Intern Experience application! This is a Laravel application built with Laravel Sail and Prism, designed for our software development graduate event.
Before you begin, ensure you have the following installed on your machine:
- Docker Desktop (required for Laravel Sail)
- Composer (PHP dependency manager)
- See installation instructions below
- Git (for cloning the repository)
- A terminal application (Terminal on Mac, PowerShell/WSL on Windows)
Option 1: Using Homebrew (Recommended)
If you have Homebrew installed, simply run:
brew install composerOption 2: Manual Installation
- Open Terminal and run this command to download the installer:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"- Run the installer:
php composer-setup.php- Move Composer to make it globally accessible:
sudo mv composer.phar /usr/local/bin/composer- Verify the installation:
composer --version-
Download and run the Composer-Setup.exe
-
Follow the installation wizard:
- It will automatically find your PHP installation
- Use the default settings unless you have specific requirements
-
After installation, open a new Command Prompt or PowerShell window and verify:
composer --versionFor more detailed installation instructions and troubleshooting, visit the official Composer documentation.
Follow these steps to get the application running on your local machine:
π Challenge Day Setup: You will receive an OpenAI API key on challenge day that needs to be added to your
.envfile for the AI commentary features to work.
git clone [repository-url]
cd figured-intern-experienceInstall the Composer packages locally (this is needed to get Laravel Sail):
composer installLaunch the Docker containers using Laravel Sail:
./vendor/bin/sail upThis command will start all the necessary services (web server, database, etc.). Keep this terminal window open while working on the application.
In a new terminal window, run these commands to configure the application:
Copy env file:
cp .env.example .envGenerate the application encryption key:
./vendor/bin/sail artisan key:generateRun database migrations:
./vendor/bin/sail artisan migrateAdd OpenAI API Key (Challenge Day):
# Edit your .env file and add the provided API key:
OPENAI_API_KEY=your-api-key-hereInstall the Node.js packages required for the frontend:
./vendor/bin/sail npm installRun the Vite development server for hot-reloading and asset compilation:
./vendor/bin/sail npm run devKeep this terminal window open alongside the Sail containers for the best development experience.
Once all services are running, you can access the application at:
You should see the default Laravel welcome page.
Here are some commands you'll find helpful during development:
# Start containers in the background
./vendor/bin/sail up -d
# Stop containers
./vendor/bin/sail down
# Run Artisan commands
./vendor/bin/sail artisan [command]
# Access the MySQL database
./vendor/bin/sail mysql
# Run tests
./vendor/bin/sail test# Build assets for production
./vendor/bin/sail npm run build
# Run the development server
./vendor/bin/sail npm run dev
# Format code with Prettier
./vendor/bin/sail npm run format- Docker not running: Make sure Docker Desktop is running before executing Sail commands
- Port conflicts: If you get port errors, another service might be using port 80. You can change the port by setting
APP_PORTin your.envfile
If you encounter permission issues, you might need to run:
chmod +x ./vendor/bin/sail- If using Windows, consider using WSL2 for better performance
- Run commands in WSL2 terminal rather than PowerShell for best compatibility
figured-intern-experience/
βββ app/ # Laravel application code
βββ resources/ # Frontend assets (Vue components, CSS)
βββ routes/ # Application routes
βββ database/ # Migrations and seeders
βββ public/ # Publicly accessible files
βββ docker-compose.yml # Docker configuration
- Laravel - PHP web framework
- Laravel Sail - Docker development environment
- Laravel Prism - API documentation
- Vue.js - Frontend framework
- Vite - Build tool and dev server
- TypeScript - Type-safe JavaScript
If you encounter any issues during setup, please reach out to the event organizers or check the documentation for:
Happy coding! π