A modern web application for developers to share and discover tech stacks. Built with Bun, Elysia, React, and Tailwind CSS.
Backend:
- Bun runtime
- Elysia framework
- Prisma ORM
- SQLite/LibSQL database
Frontend:
- React 18 + TypeScript
- Vite build tool
- Tailwind CSS
- Framer Motion animations
- Bun v1.0+
- Git
git clone <repository-url>
cd stack-it# Backend
cd backend
bun install
# Frontend
cd ../frontend
bun installCreate backend/.env:
DATABASE_URL="file:./dev.db"
JWT_SECRET="your-secret-key"
PORT=3001From the project root:
bun run db:setupThis generates the Prisma client, pushes the schema, and seeds sample data.
From the project root:
bun run devThis starts both servers concurrently:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
stack-it/
├── backend/
│ ├── src/
│ │ ├── index.ts # Elysia server entry
│ │ ├── db.ts # Prisma client
│ │ └── routes/ # API routes
│ ├── prisma/
│ │ └── schema.prisma # Database schema
│ ├── package.json
│ └── railway.json # Railway deployment config
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── App.tsx # Main app with routing
│ │ └── main.tsx # Entry point
│ ├── package.json
│ └── railway.json # Railway deployment config
├── templates/ # Legacy Jinja templates
├── static/ # Static assets
└── DEPLOYMENT.md # Railway deployment guide
Root (recommended):
bun run dev # Start both frontend and backend
bun run dev:backend # Start backend only
bun run dev:frontend # Start frontend only
bun run db:setup # Set up database (generate, push, seed)
bun run db:reset # Reset database (delete, regenerate, reseed)Backend (cd backend):
bun run dev # Start dev server with hot reload
bun run start # Start production server
bun run db:generate # Generate Prisma client
bun run db:push # Push schema changes
bun run db:studio # Open Prisma Studio
bun run db:seed # Seed databaseFrontend (cd frontend):
bun run dev # Start Vite dev server
bun run build # Build for production
bun run preview # Preview production buildStack-It is configured for Railway deployment. See DEPLOYMENT.md for full instructions.
Quick deploy:
- Push to GitHub
- Connect repo to Railway
- Create two services:
backend/andfrontend/ - Set environment variables
- Deploy
- User authentication (JWT)
- Create and share tech stack posts
- Community feed with trending posts
- Favorites system
- Responsive design
- Animated UI components
POST /api/auth/register # Register new user
POST /api/auth/login # Login user
GET /api/posts # Get all posts
POST /api/posts # Create post
GET /api/posts/:id # Get single post
DELETE /api/posts/:id # Delete post
GET /api/users/:id # Get user profile
POST /api/favorites # Add favorite
DELETE /api/favorites/:id # Remove favorite
ISC