A Product Hunt-inspired platform for discovering and sharing terminal-based applications. Built with Next.js, TypeScript, PostgreSQL, and Tailwind CSS.
- 🔐 Authentication: Support for Google, Twitter/X OAuth and email/password signup
- 📝 App Submission: Submit terminal apps with Markdown descriptions and installation instructions
- ⭐ Voting System: Vote for your favorite applications
- 💬 Comments: Engage with the community through comments
- 🏆 Leaderboards: Track the most popular apps across different time periods
- 🏷️ Tags: Filter applications by categories
- 🔍 Search: Find applications by name or description
- 👤 User Profiles: View user submissions, comments, and achievements
- 📱 Responsive Design: Works great on desktop and mobile
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, WebTUI CSS
- Authentication: NextAuth.js
- Database: PostgreSQL with Drizzle ORM
- Markdown: React Markdown
- Package Manager: Bun
- Node.js 18+ or Bun
- PostgreSQL 14+
- Google OAuth credentials (optional)
- Twitter/X OAuth credentials (optional)
git clone <your-repo>
cd terminal-hunt
bun install
Create a PostgreSQL database:
CREATE DATABASE terminal_hunt;
Run the initialization script:
psql -d terminal_hunt -f database/init.sql
Create a .env.local
file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/terminal_hunt"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"
# Google OAuth (optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Twitter OAuth (optional)
TWITTER_CLIENT_ID="your-twitter-client-id"
TWITTER_CLIENT_SECRET="your-twitter-client-secret"
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google
- Go to Twitter Developer Portal
- Create a new app
- Set up OAuth 2.0 with PKCE
- Add callback URL:
http://localhost:3000/api/auth/callback/twitter
Generate and push the database schema:
bun run db:generate
bun run db:push
bun run dev
Visit http://localhost:3000 to see the application.
bun run dev
- Start development serverbun run build
- Build for productionbun run start
- Start production serverbun run lint
- Run ESLintbun run db:push
- Push database schemabun run db:studio
- Open Drizzle Studiobun run db:generate
- Generate database migrations
src/
├── app/ # Next.js app router pages
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
│ ├── app/[id]/ # App detail pages
│ ├── profile/[userTag]/ # User profile pages
│ ├── submit/ # Submit app page
│ ├── leaderboard/ # Leaderboard page
│ └── about/ # About page
├── components/ # Reusable React components
├── lib/ # Utility libraries
│ └── db/ # Database configuration and schema
└── types/ # TypeScript type definitions
database/
└── init.sql # Database initialization script
GET /api/apps
- List apps with sorting and filteringPOST /api/apps
- Create new app (authenticated)GET /api/apps/[id]
- Get app detailsPOST /api/apps/[id]/vote
- Vote for an app (authenticated)POST /api/apps/[id]/comments
- Add comment (authenticated)POST /api/apps/[id]/view
- Log app view
GET /api/users/[userTag]
- Get user profilePUT /api/users/[userTag]
- Update user profile (authenticated)
POST /api/auth/signup
- Create new account- NextAuth.js endpoints at
/api/auth/*
GET /api/tags
- List all tags
GET /api/leaderboards/[period]
- Get leaderboard data (daily, weekly, monthly, yearly)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open source and available under the MIT License.
If you encounter any issues or have questions, please open an issue on GitHub.