A modern personal CRM application built with SvelteKit and Appwrite Functions. Features a beautiful spreadsheet-like interface for managing contacts with real-time CRUD operations. No authentication required β perfect for personal use.
- Frontend: SvelteKit with modern CSS
- Backend: Appwrite Functions (Node.js runtime)
- Database: Appwrite Database
- Deployment: Appwrite Cloud
- β Spreadsheet-like interface for contact management
- β Real-time CRUD operations (Create, Read, Update, Delete)
- β Bulk editing capabilities
- β Modern responsive design with gradient backgrounds
- β No authentication required (personal use)
- β CSV import/export support
/src
βββ /routes
β βββ +page.svelte # Main UI with spreadsheet interface
β βββ +layout.js # Layout configuration
βββ /lib
β βββ appwrite.js # Appwrite client configuration
βββ app.css # Global styles and modern UI
/functions
βββ /database-operations # Appwrite Function for CRUD operations
βββ src/
β βββ main.js # Function entry point
β βββ db.js # Database operations
βββ package.json # Function dependencies
- Create a project on Appwrite Console
- Create a Database with ID:
db
- Create a Collection with ID:
crm
and these attributes:name
β String (required, 255 chars)email
β String (required, 255 chars)phone
β String (optional, 50 chars)notes
β String (optional, 1000 chars)
# Install Appwrite CLI
npm install -g appwrite-cli
# Login to Appwrite
appwrite login
# Deploy the function
appwrite deploy function
Create a .env
file in the project root:
PUBLIC_APPWRITE_ENDPOINT=https://region.cloud.appwrite.io/v1
PUBLIC_APPWRITE_PROJECT_ID=your_project_id
PUBLIC_APPWRITE_FUNCTION_URL=https://654321.fra.appwrite.network
The function environment is configured automatically through the Appwrite console. Required variables:
CORS_ORIGIN
APPWRITE_DATABASE_ID=db
APPWRITE_COLLECTION_ID=crm
# Install dependencies
npm install
# Copy the environment template
cp .env.example .env
# Edit .env with your Appwrite project details
# Then start the development server
npm run dev
The app will be available at http://localhost:5173
For local function development:
# Navigate to the function directory
cd functions/database-operations
# Install function dependencies
npm install
# Test the function locally (optional)
appwrite run functions
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
Deploy to any static hosting provider (Vercel, Netlify, etc.) or use Appwrite's hosting feature.
Functions are deployed automatically when you run:
appwrite push function
The function will be available at your Appwrite project's function URL.
The Appwrite Function provides the following endpoints:
Returns all contacts from the database.
Response:
{
"total": 1,
"documents": [
{
"$id": "contact_id",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1-555-0123",
"notes": "Important client"
}
]
}
Creates new contacts or updates existing ones (bulk upsert).
Request Body:
{
"contacts": [
{
"name": "Jane Smith",
"email": "[email protected]",
"phone": "+1-555-0124",
"notes": "New prospect"
}
]
}
Deletes contact by their ID in the query.
Deletes all contacts.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request