A full-stack web application built with SvelteKit where users can share their worst day experiences, confessions, and stories with the community. Warrior Zone provides a safe and supportive platform for authentic expression and community engagement.
Warrior Zone is a social platform designed to help people share their experiences and connect with others who may be going through similar situations. Built entirely with Svelte and SvelteKit, it combines a modern frontend with a powerful backend in a single cohesive framework.
Before you begin, ensure you have the following installed:
git clone https://github.com/the-bipu/warrior-zone.git
cd warrior-zone
npm install
# or
pnpm install
# or
yarn install
Create a .env file in the root directory:
# Database Configuration
DATABASE_URL=your_database_url_here
# API Keys (if needed)
API_SECRET=your_secret_key_here
# Application Settings
PUBLIC_APP_URL=http://localhost:5173
npm run dev
# or
npm run dev -- --open
The application will be available at http://localhost:5173
warrior-zone/
āāā src/
ā āāā routes/ # SvelteKit routes (pages)
ā ā āāā +page.svelte # Home page
ā ā āāā about/ # About page
ā ā ā āāā +page.svelte
ā ā āāā confession/ # Individual confession view
ā ā ā āāā [id]/
ā ā ā āāā +page.svelte
ā ā āāā confess/ # Create confession page
ā ā ā āāā +page.svelte
ā ā āāā explore/ # Explore content page
ā ā ā āāā +page.svelte
ā ā āāā contact/ # Contact page
ā ā ā āāā +page.svelte
ā ā āāā api/ # Backend API routes
ā ā āāā confessions/ # Confession endpoints
ā ā āāā likes/ # Like system endpoints
ā ā āāā users/ # User management endpoints
ā āāā lib/ # Shared library code
ā ā āāā components/ # Reusable Svelte components
ā ā āāā stores/ # Svelte stores for state management
ā ā āāā utils/ # Utility functions
ā ā āāā types/ # TypeScript type definitions
ā āāā app.html # HTML template
ā āāā app.css # Global styles
āāā static/ # Static assets (images, fonts, etc.)
āāā tests/ # Test files
āāā svelte.config.js # SvelteKit configuration
āāā vite.config.js # Vite configuration
āāā tsconfig.json # TypeScript configuration
āāā package.json # Dependencies and scripts
/)The main landing page displaying a feed of recent confessions and experiences from the community. Users can browse, filter, and interact with posts.
/about)Information about Warrior Zone, its mission to provide a supportive community, guidelines for respectful interaction, and the story behind the platform.
/confession/[id])Detailed view of individual confessions with full content, author information (if not anonymous), likes count, and engagement options.
/confess)A form page where users can submit their own experiences and stories. Options to post anonymously or with their profile, add tags, and categorize their confession.
/explore)Discovery page featuring trending confessions, popular tags, categories, and curated content to help users find relevant experiences.
/contact)Contact form for users to reach out to the Warrior Zone team for support, feedback, partnerships, or general inquiries.
The backend is built using SvelteKit's server routes located in src/routes/api/:
GET /api/confessions - Fetch all confessionsGET /api/confessions/[id] - Get specific confessionPOST /api/confessions - Create new confessionPUT /api/confessions/[id] - Update confessionDELETE /api/confessions/[id] - Delete confessionPOST /api/likes/[id] - Like a confessionDELETE /api/likes/[id] - Unlike a confessionGET /api/likes/[id] - Get like countPOST /api/users/register - Register new userPOST /api/users/login - User authenticationGET /api/users/profile - Get user profile# Development
npm run dev # Start development server
npm run dev -- --open # Start dev server and open browser
# Building
npm run build # Build for production
# Preview
npm run preview # Preview production build
# Testing
npm run test # Run tests
npm run test:watch # Run tests in watch mode
# Testing
npm run test # Run tests
npm run test:watch # Run tests in watch mode
# Linting & Formatting
npm run lint # Run ESLint
npm run format # Format code with Prettier
# Type Checking
npm run check # Check TypeScript types
npm run check:watch # Watch mode for type checking
The project uses [CSS/Tailwind/your styling solution]. Styles are organized as:
src/app.css.svelte componentsWarrior Zone is fully responsive and optimized for:
npm run build
npm install -g vercel
vercel
SvelteKit requires an adapter for deployment. Common options:
# For Node.js servers
npm install -D @sveltejs/adapter-node
# For static sites
npm install -D @sveltejs/adapter-static
# For Vercel
npm install -D @sveltejs/adapter-vercel
Update svelte.config.js with your chosen adapter.
We welcome contributions! Here's how you can help:
git checkout -b feature/AmazingFeature
git commit -m 'Add some AmazingFeature'
git push origin feature/AmazingFeature
This project uses ESLint and Prettier for code quality:
# Check code style
npm run lint
# Auto-fix issues
npm run lint:fix
# Format code
npm run format
Port already in use:
# Kill process on port 5173
kill -9 $(lsof -ti:5173)
Module not found:
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install
Build errors:
# Clear SvelteKit cache
rm -rf .svelte-kit
npm run build
To report security vulnerabilities, please email: security@warriorzone.com
This project is open source and available under the MIT License.
Built with ā¤ļø using SvelteKit
Share your story. Connect with others. You're not alone. šŖ
For more information about SvelteKit, visit kit.svelte.dev