mirror of
https://github.com/shadoll/sLogos.git
synced 2025-12-20 07:31:01 +00:00
3.1 KiB
3.1 KiB
Logo Gallery - Developer Documentation
This document provides instructions for setting up, running, and contributing to the Logo Gallery project.
Development Environment Setup
Prerequisites
- Docker and Docker Compose
- Git
No local Node.js installation is required as all operations run inside Docker containers.
Getting Started
-
Clone the repository:
git clone https://github.com/yourusername/logos.git cd logos -
Build and start the application:
make build make start -
Access the application at http://localhost:5005
Common Development Tasks
Adding New Logos
- Add logo files (SVG or PNG preferred) to the
public/logos/directory - Scan the logos directory and update the data file:
(This runs
make scan-logos-devnpm run scan-logosinside the dev container) - The application will automatically rebuild with the new logos
Modifying the UI
- Edit files in the
src/directory - The changes will require a rebuild:
make rebuild
Running Custom Commands
To run any npm or shell command inside the Docker container:
make run CMD="your-command-here"
Examples:
- List logo files:
make run CMD="ls -la public/logos" - Run a specific npm script:
make run CMD="npm run some-script"
Project Structure
logos/
├── public/ # Static assets
│ ├── logos/ # Logo files (SVG, PNG)
│ ├── data/ # JSON data files
│ ├── build/ # Compiled JS/CSS (generated)
│ └── global.css # Global styles
├── src/ # Application source code
│ ├── components/ # Svelte components
│ ├── App.svelte # Main app component
│ └── main.js # App entry point
├── scripts/ # Utility scripts
├── Dockerfile # Docker configuration
├── compose.yml # Docker Compose configuration
├── Makefile # Development commands
└── README.md # Project overview
Deployment to GitHub Pages
To deploy the application to GitHub Pages:
-
Build the application:
make build -
The
public/directory contains all files needed for deployment -
Push the contents of the
public/directory to thegh-pagesbranch of your repository
Available Make Commands
Run make help to see all available commands:
make build- Build the Docker containermake start- Start the applicationmake stop- Stop the applicationmake restart- Restart the applicationmake logs- View the application logsmake run CMD=<cmd>- Run a command in the containermake scan-logos-dev- Scan logos directory and update logos.jsonmake clean- Clean up build artifactsmake rebuild- Completely rebuild from scratch
Troubleshooting
If you encounter issues:
- Check the logs:
make logs - Try a complete rebuild:
make rebuild - Ensure the Docker service is running
- Verify your logo files are in the correct format and location