Skip to content

Fx-4/Generate-Idea

Repository files navigation

IdeasSpark 🎯✨

Never run out of project ideas again! IdeasSpark is a smart project idea randomizer that helps developers find their next coding project with curated ideas, tech stack recommendations, and monetization tips.

🌟 Unique Value Proposition

Unlike basic project idea generators, IdeasSpark offers:

  • 🎨 Smart Tech Stack Builder - Choose from multiple compatible frontend + backend + database combinations
  • πŸ“Š Portfolio Impact Score - Know how impressive each project will look in your portfolio (1-10 scale)
  • πŸ’° Monetization Hints - Learn how to turn side projects into revenue streams
  • πŸŽ“ Learning Resources - Auto-curated tutorials and docs for your chosen tech stack
  • πŸ”Œ API Recommendations - Suggested APIs to make your project more dynamic
  • ⚑ Advanced Filtering - Filter by category, difficulty level, and estimated time
  • 55+ Curated Ideas - Hand-picked projects across 10+ categories with real value

πŸš€ Features

Core Features (Completed βœ…)

  • βœ… Random project idea generator with smart filtering
  • βœ… 55+ curated project ideas across multiple categories
  • βœ… Tech stack options for each project
  • βœ… Difficulty levels (Beginner, Intermediate, Advanced)
  • βœ… Time estimates for project completion
  • βœ… Portfolio impact scoring
  • βœ… Monetization tips
  • βœ… Learning resource links
  • βœ… Beautiful, responsive UI with TailwindCSS

Advanced Features (New! πŸŽ‰)

  • βœ… User Authentication - Register, login with JWT tokens
  • βœ… Favorites System - Save your favorite project ideas
  • βœ… Voting System - Upvote/downvote projects
  • βœ… AI-Powered Idea Generation - Generate custom project ideas with Gemini AI
  • βœ… Advanced Search & Filter - Search by keyword, category, difficulty, tech stack, portfolio score
  • βœ… Top Rated & Trending - Discover popular projects
  • βœ… User Dashboard - Personal statistics and activity timeline
  • βœ… Leaderboard - Top contributors and most active users
  • βœ… Global Stats - Platform-wide analytics
  • βœ… Community Contributions - Submit your own project ideas

Coming Soon (Phase 3)

  • πŸ”œ Project rating system (1-5 stars)
  • πŸ”œ Comments and reviews
  • πŸ”œ Notification system
  • πŸ”œ Tags system
  • πŸ”œ Project analytics (views, favorites over time)

πŸ› οΈ Tech Stack

Frontend

  • React 18 - UI library
  • Vite - Build tool and dev server
  • TypeScript - Type safety
  • TailwindCSS - Styling
  • Axios - HTTP client
  • Lucide React - Beautiful icons

Backend

  • Go - Fast, compiled language
  • Fiber - Express-inspired web framework
  • PostgreSQL - Relational database
  • JWT - Authentication (Phase 2)

DevOps (Recommended)

  • Frontend: Vercel / Netlify
  • Backend: Railway / Fly.io
  • Database: Supabase / Railway PostgreSQL

πŸ“¦ Project Structure

randomize-idea/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”‚   └── ProjectCard.tsx
β”‚   β”‚   β”œβ”€β”€ services/      # API services
β”‚   β”‚   β”‚   └── api.ts
β”‚   β”‚   β”œβ”€β”€ types/         # TypeScript types
β”‚   β”‚   β”‚   └── index.ts
β”‚   β”‚   β”œβ”€β”€ App.tsx        # Main app component
β”‚   β”‚   └── main.tsx       # Entry point
β”‚   β”œβ”€β”€ .env.example
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/                # Go backend
β”‚   β”œβ”€β”€ database/          # Database connection & schemas
β”‚   β”‚   β”œβ”€β”€ db.go
β”‚   β”‚   β”œβ”€β”€ schema.sql
β”‚   β”‚   └── seed.sql
β”‚   β”œβ”€β”€ handlers/          # API handlers
β”‚   β”‚   └── projects.go
β”‚   β”œβ”€β”€ models/            # Data models
β”‚   β”‚   └── project.go
β”‚   β”œβ”€β”€ routes/            # Route definitions
β”‚   β”‚   └── routes.go
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ go.mod
β”‚   └── main.go            # Server entry point
β”‚
└── README.md

πŸƒ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • Go (v1.21 or higher)
  • PostgreSQL (v14 or higher)

Installation

1. Clone the repository

git clone <your-repo-url>
cd randomize-idea

2. Setup Database

# Create PostgreSQL database
createdb ideasspark

# Option 1: Run migrations automatically (Recommended)
# Windows:
run-migrations.bat

# Linux/Mac:
chmod +x setup-database.sh
./setup-database.sh

# Option 2: Run manually
psql ideasspark < server/database/schema.sql
psql ideasspark < server/database/migrations/001_add_ai_generated_field.sql
psql ideasspark < server/database/migrations/002_rename_password_to_password_hash.sql
psql ideasspark < server/database/migrations/003_add_ratings_system.sql
psql ideasspark < server/database/migrations/005_comments.sql

# Seed data with 55+ project ideas
psql ideasspark < server/database/seed.sql

3. Setup Backend

cd server

# Copy environment variables
cp .env.example .env

# Edit .env with your database credentials
# DATABASE_URL=postgres://user:password@localhost:5432/ideasspark?sslmode=disable

# Install Go dependencies
go mod download

# Run the server
go run main.go

The backend will start on http://localhost:8080

4. Setup Frontend

cd client

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env

# The default API URL is http://localhost:8080/api
# Edit .env if your backend runs on a different port

# Start the development server
npm run dev

The frontend will start on http://localhost:5173

πŸŽ‰ You're ready!

Open your browser and go to http://localhost:5173 to start using IdeasSpark!

πŸ“– API Documentation

Authentication Endpoints

Register

POST /api/auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "username": "username",
  "password": "password123"
}

Login

POST /api/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "password123"
}

Get Current User (πŸ”’ Auth Required)

GET /api/auth/me
Authorization: Bearer <token>

Project Endpoints

Get Random Project

GET /api/projects/random?category=Web Development&difficulty=beginner

Get All Projects

GET /api/projects?category=Web&difficulty=beginner&limit=20&offset=0

Advanced Search

GET /api/projects/search?keyword=chat&category=Web&tech_stack=React&min_score=7&sort_by=votes&sort_order=desc

Query Parameters:

  • keyword - Search in title and description
  • category - Filter by category
  • difficulty - beginner, intermediate, advanced
  • tech_stack - Search in tech stacks
  • min_score, max_score - Portfolio score range (1-10)
  • ai_generated - true/false
  • sort_by - votes, created_at, portfolio_score, title
  • sort_order - asc/desc
  • limit, offset - Pagination

Top Rated Projects

GET /api/projects/top-rated?limit=10

Trending Projects

GET /api/projects/trending?days=7&limit=10

Get Project by ID

GET /api/projects/:id

Get Categories

GET /api/projects/categories

Get AI-Generated Ideas

GET /api/projects/ai-generated?limit=20&offset=0

Create Project (πŸ”’ Auth Required)

POST /api/projects
Authorization: Bearer <token>
Content-Type: application/json

{
  "title": "Your Project Title",
  "description": "Description...",
  "category": "Web Development",
  "difficulty": "intermediate",
  "time_estimate": "1 week",
  "tech_stacks": [...],
  "apis": [...],
  "portfolio_score": 8,
  "monetization_tip": "...",
  "learning_paths": [...]
}

Delete Project (πŸ”’ Auth Required)

DELETE /api/projects/:id
Authorization: Bearer <token>

AI Generation Endpoints

Generate Custom Idea

POST /api/ai/generate
Content-Type: application/json

{
  "skill_level": "intermediate",
  "tech_stack": "React, Node.js, PostgreSQL",
  "time_available": "1-2 weeks",
  "category": "Web Development",
  "interests": "automation, productivity"
}

Generate and Save Idea

POST /api/ai/generate-and-save
Content-Type: application/json

{
  "skill_level": "beginner",
  "tech_stack": "HTML, CSS, JavaScript",
  "time_available": "3-5 days",
  "category": "Web Development",
  "interests": "games, interactive"
}

Favorites Endpoints (πŸ”’ All require authentication)

Get User Favorites

GET /api/favorites
Authorization: Bearer <token>

Add Favorite

POST /api/favorites
Authorization: Bearer <token>
Content-Type: application/json

{
  "project_id": 1
}

Remove Favorite

DELETE /api/favorites/:project_id
Authorization: Bearer <token>

Voting Endpoints (πŸ”’ All require authentication)

Vote on Project

POST /api/votes
Authorization: Bearer <token>
Content-Type: application/json

{
  "project_id": 1,
  "vote_type": "up"  // or "down"
}

Note: Voting same type again removes the vote (toggle). Voting opposite type changes the vote.

Get User Votes

GET /api/votes
Authorization: Bearer <token>

Statistics Endpoints

Global Platform Stats

GET /api/stats/global

Response:

{
  "total_users": 100,
  "total_projects": 250,
  "total_votes": 500,
  "total_favorites": 300,
  "ai_generated_projects": 50,
  "user_contributed_projects": 25,
  "most_popular_category": {
    "name": "Web Development",
    "count": 80
  }
}

Leaderboard

GET /api/stats/leaderboard?metric=votes_received&limit=10

Metrics:

  • votes_received - Most voted projects
  • projects_created - Most prolific creators
  • votes_given - Most active voters

User Personal Stats (πŸ”’ Auth Required)

GET /api/stats/me
Authorization: Bearer <token>

User Activity Timeline (πŸ”’ Auth Required)

GET /api/stats/activity?limit=20
Authorization: Bearer <token>

Health Check

GET /api/health

🎨 Project Categories

  • Web Development - Full-stack web applications
  • Mobile Development - iOS/Android apps
  • API Development - Backend services and APIs
  • CLI Tool - Command-line utilities
  • Game Development - 2D/3D games
  • Browser Extension - Chrome/Firefox extensions
  • Data Science - ML/AI projects
  • Productivity - Tools to boost productivity
  • Blockchain - Web3 and crypto projects

πŸ’‘ Example Projects Included

  • Real-time Chat Application
  • Recipe Finder with AI
  • Task Management Board (Trello Clone)
  • Weather Dashboard
  • E-commerce Product Page
  • URL Shortener Service
  • Markdown Blog Platform
  • Portfolio Generator
  • Job Board Aggregator
  • Habit Tracker App
  • NFT Marketplace
  • Crypto Portfolio Tracker
  • And 43 more...

🀝 Contributing (Phase 2)

Once we enable user contributions, you'll be able to:

  1. Submit your own project ideas
  2. Vote on existing projects
  3. Add tech stack variations
  4. Share monetization strategies

πŸ“ Development Notes

Running Tests

# Backend
cd server
go test ./...

# Frontend
cd client
npm run test

Building for Production

Frontend

cd client
npm run build
# Output in client/dist/

Backend

cd server
go build -o ideasspark-api
# Binary: ./ideasspark-api

πŸš€ Deployment

Frontend (Vercel)

  1. Push code to GitHub
  2. Import project on Vercel
  3. Set environment variable: VITE_API_URL=https://your-backend-url.com/api
  4. Deploy!

Backend (Railway)

  1. Create Railway project
  2. Add PostgreSQL plugin
  3. Set environment variables from .env.example
  4. Deploy Go service
  5. Run schema and seed SQL in Railway PostgreSQL

Database

  • Use Railway PostgreSQL, Supabase, or any PostgreSQL hosting
  • Don't forget to run schema.sql and seed.sql

πŸ” Environment Variables

Backend (.env)

PORT=8080
DATABASE_URL=postgres://user:password@localhost:5432/ideasspark?sslmode=disable
JWT_SECRET=your-super-secret-key  # For Phase 2

Frontend (.env)

VITE_API_URL=http://localhost:8080/api

πŸ› Troubleshooting

Database Connection Failed

  • Make sure PostgreSQL is running
  • Verify DATABASE_URL in server/.env
  • Check username, password, and database name

Frontend Can't Fetch Data

  • Ensure backend is running on port 8080
  • Check CORS settings in server/main.go
  • Verify VITE_API_URL in client/.env

"go: command not found"

Port Already in Use

  • Change PORT in server/.env
  • Update VITE_API_URL in client/.env

πŸ“„ License

MIT License - feel free to use this for your own projects!

πŸ™ Acknowledgments

  • Inspired by the need to never be bored as a developer
  • Built with love for the developer community
  • Special thanks to all open-source libraries used

Built with β™₯ using React, Go, and PostgreSQL

Questions? Ideas? Open an issue or contribute! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors