A modern, responsive web application built with SvelteKit for managing and donating to charitable causes. This platform enables users to browse charity projects, view donation progress, and make secure payments through Midtrans integration.
Clone the repository
git clone <your-repo-url>
cd charity
Install dependencies
pnpm install
# or
npm install
Set up environment variables
Create a .env
file in the root directory:
MIDTRANS_SERVER_KEY=your_midtrans_server_key
MIDTRANS_CLIENT_KEY=your_midtrans_client_key
Run the development server
pnpm dev
# or
npm run dev
Open your browser
Navigate to http://localhost:5173
charity/
โโโ src/
โ โโโ components/ # Reusable UI components
โ โ โโโ CharityList.svelte
โ โ โโโ Header.svelte
โ โ โโโ Footer.svelte
โ โ โโโ Modal.svelte
โ โ โโโ Welcome.svelte
โ โโโ data/ # Static data and mock content
โ โ โโโ charities.ts
โ โโโ domain/ # TypeScript type definitions
โ โ โโโ CharitiesType.ts
โ โโโ lib/ # Assets and utilities
โ โ โโโ assets/ # CSS, images, fonts
โ โ โโโ index.ts
โ โโโ routes/ # Page routes and layouts
โ โโโ +layout.svelte
โ โโโ +page.svelte
โ โโโ about/
โ โโโ contact/
โ โโโ donation/
โ โโโ success/
โ โโโ failure/
โโโ netlify/ # Netlify configuration
โ โโโ functions/ # Serverless functions
โ โ โโโ hello.ts
โ โ โโโ payment.ts
โ โโโ netlify.toml
โโโ static/ # Static assets
โโโ package.json
pnpm dev
- Start development serverpnpm build
- Build for productionpnpm preview
- Preview production buildpnpm check
- Type check and lint codepnpm format
- Format code with Prettierpnpm lint
- Run ESLintpnpm test
- Run unit testspnpm test:unit
- Run tests in watch modeThe platform integrates with Midtrans payment gateway for secure donation processing:
This project is configured for Netlify deployment:
pnpm build
# Deploy the contents of the 'build' directory
# Run unit tests
pnpm test:unit
# Run tests in watch mode
pnpm test:unit -- --watch
# Run all tests
pnpm test
The application is fully responsive and optimized for:
Multiple color themes are available in src/lib/assets/css/colors/
:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
Made with โค๏ธ for making the world a better place through charitable giving.