This repository contains the source code for the SocialVibe web application, a SvelteKit application with WebAssembly integration, designed to be deployed on Cloudflare Pages.
- Prerequisites
- Getting Started
- Development
- Building
- Deployment
- Project Structure
- Technologies Used
- Contributing
- License
Before you begin, ensure you have the following installed:
- Node.js (v18 or later recommended)
- npm (usually comes with Node.js)
- Rust
- wasm-pack
- Wrangler CLI
-
Clone the repository:
git clone https://github.com/your-username/socialvibe-webapp.git cd socialvibe-webapp
-
Install dependencies:
npm install
-
Build the WebAssembly module:
npm run wasm
To start the development server:
npm run dev
This will start the SvelteKit development server, usually at http://localhost:5173
.
To build the project for production:
npm run build
This command will:
- Build the WebAssembly module
- Compile the SvelteKit application
- Prepare the output for Cloudflare Pages deployment
Due to the custom WebAssembly build step, this project requires manual deployment to Cloudflare Pages. Automatic deployments from Git are not supported because Cloudflare's build environment doesn't include wasm-pack
.
To deploy:
-
Ensure you're logged in to Wrangler:
wrangler login
-
Build and deploy the project:
npm run deploy
This will build the project and deploy it to Cloudflare Pages.
src/
: SvelteKit application sourcesocialvibe-lib/
: Rust source for WebAssembly modulestatic/
: Static assetsvite.config.ts
: Vite configurationsvelte.config.js
: SvelteKit configurationtailwind.config.ts
: Tailwind CSS configurationwrangler.toml
: Cloudflare Workers configuration
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.