A community platform connecting newcomers and locals to facilitate smooth integration and mutual support. WelcomeWay enables users to ask for help, offer assistance, and build meaningful connections within their communities.
- Authentication System: Secure JWT-based authentication with access/refresh tokens
- User Profiles: Customizable profiles with avatars, location, and reputation system
- Role-based Access: Support for newcomers and locals with different capabilities
- Multi-language Support: Available in English, German, and Russian
- Help Requests: Users can post requests for assistance
- Offer Help: Community members can offer support and services
- Post Management: Create, edit, and delete community posts
- User Discovery: View other users' profiles and contributions
- Reputation System: Track user contributions and build trust
- Real-time Updates: Dynamic content loading and updates
- File Upload: Avatar and document upload capabilities
- Responsive Design: Mobile-first responsive interface
- Protected Routes: Secure access control for authenticated users
- API Documentation: Comprehensive Swagger documentation
- React 19 with TypeScript for type safety
- Redux Toolkit for state management
- React Router for navigation and protected routes
- CSS Modules for component styling
- Vite for fast development and building
- i18next for internationalization
- Cloudflare Workers for serverless API endpoints
- D1 Database (SQLite) for data persistence
- R2 Storage for file uploads and static assets
- Drizzle ORM for database operations
- JWT Authentication with token refresh mechanism
- OpenAPI/Swagger for API documentation
- Cloudflare Pages for frontend deployment
- Cloudflare Workers for backend API
- CI/CD Pipeline with automated deployments
- Edge Network for global performance
- Node.js 18+
- npm or yarn
- Cloudflare account
- Wrangler CLI
-
Clone the repository
git clone https://github.com/yourusername/welcome-way.git cd welcome-way -
Install dependencies
npm install
-
Set up environment variables Create a
.envfile in the root directory:JWT_SECRET_TOKEN=your-secret-key ACCESS_TOKEN_EXPIRES_IN=3600 REFRESH_TOKEN_EXPIRES_IN=604800
-
Set up Cloudflare Workers
npx wrangler login npx wrangler d1 create welcome-way-db npx wrangler r2 bucket create avatars-bucket
-
Run database migrations
npx wrangler d1 migrations apply welcome-way-db
-
Start development server
npm run fdev # Frontend only npm run dev # Full stack with Workers
npm run fdev- Start frontend development servernpm run dev- Start Cloudflare Workers development servernpm run build- Build for productionnpm run deploy- Deploy to Cloudflarenpm run lint- Run ESLint
The API documentation is available at /docs when running the development
server. Key endpoints include:
POST /api/private/auth/register- User registrationPOST /api/private/auth/login- User loginPOST /api/private/auth/refresh- Refresh access tokenGET /api/private/auth/me- Get current user info
GET /api/public/users/:id- Get public user informationPOST /api/private/auth/upload-avatar- Upload user avatar
GET /api/public/posts- Get all postsPOST /api/private/create-post- Create new postPUT /api/private/posts/:id- Update postDELETE /api/private/posts/:id- Delete post
The project uses Drizzle ORM with the following main tables:
users- User profiles and authenticationposts- Community posts and help requests
- HomePage: Landing page with features and testimonials
- ProfilePage: User profiles with posts and information
- SignIn/SignUp: Authentication pages
- AskingForHelp/OfferingHelp: Community interaction pages
- ProtectedRoute: Authentication guard for protected pages
- AppHeader: Navigation header for authenticated users
- PostsList: Display and manage community posts
- ProfileSidebar: User profile navigation
The project supports multiple languages:
- English (default)
- German
- Russian
Language files are located in src/i18n/locales/.
- JWT Authentication: Secure token-based authentication
- Protected Routes: Client-side route protection
- Input Validation: Zod schema validation
- Error Handling: Comprehensive error handling and logging
- CORS Configuration: Proper cross-origin resource sharing
The application is fully responsive and works on:
- Desktop (1280px+)
- Tablet (768px - 1279px)
- Mobile (320px - 767px)
npm run build
npm run deployConfigure the following in Cloudflare Workers:
- D1 Database binding
- R2 Storage binding
- Environment variables for JWT secrets
- 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
- Backend & Infrastructure: Full-stack architecture, API development, and deployment pipeline
- Frontend Design: UI/UX design and component layouts
WelcomeWay - Building bridges, not walls. π