Development
Local Development Setup
If you want to run the project locally:
Prerequisites
- Node.js (recommended: latest LTS version)
- Git
Installation Steps
Clone the repo:
bashgit clone https://github.com/ProjectDepot/SrcGallery cd SrcGallerySet up environment variables:
- Copy
.env.exampleto.env - Set your GitHub username:
VITE_GITHUB_ACTOR=your_username
Note
When deployed via GitHub Actions, the workflow handles this configuration automatically.
- Copy
Install dependencies:
bashnpm installFetch initial data for your GitHub profile:
bashnpm run fetch-dataStart the development server:
bashnpm run dev
The application will be available at http://localhost:4321.
Available Scripts
npm run dev- Start the development servernpm run build- Build the project for productionnpm run preview- Preview the production build locallynpm run fetch-data- Fetch GitHub repository datanpm run lint- Run ESLintnpm run docs:dev- Start the documentation servernpm run docs:build- Build the documentationnpm run docs:preview- Preview the documentation build
Project Structure
text
├── .github/workflows/ # GitHub Actions workflows
├── docs/ # Documentation (VitePress)
├── public/ # Static assets
├── scripts/ # Build and data fetching scripts
├── src/ # Main application source
│ ├── components/ # Vue components
│ ├── content/projects/ # Project pages (markdown files)
│ ├── pages/ # Astro pages
│ ├── types/ # TypeScript type definitions
│ ├── App.vue # Vue main page entry point
│ ├── main.ts # Vue main page entry point script
│ └── utils.ts # Utility functions
├── astro.config.mjs # Astro configuration
├── src/config.ts # Main configuration
└── src/config.user.ts # User configuration overrideContributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.