mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
feat: Add README, refactor Cryptomus feature flag to use environment variable, and include GitHub link in header.
This commit is contained in:
@@ -0,0 +1,73 @@
|
|||||||
|
# RepoHub - Cross-Platform Package Manager
|
||||||
|
|
||||||
|
**Simplify software installation across Linux, Windows, and macOS with official repositories.**
|
||||||
|
|
||||||
|
RepoHub provides a unified interface for package discovery and installation across different operating systems.
|
||||||
|
|
||||||
|
## 🚀 Features
|
||||||
|
|
||||||
|
- **Cross-Platform Support**: Works on Linux (Debian, Ubuntu, Arch, Fedora), Windows, and macOS.
|
||||||
|
- **Official Repositories**: Access software strictly from trusted, official sources.
|
||||||
|
- **Script Generation**: Generate idempotent installation scripts for your selected platform.
|
||||||
|
- **Smart Filtering**: efficiently browse and filter packages.
|
||||||
|
|
||||||
|
## 🛠️ Technology Stack
|
||||||
|
|
||||||
|
### Frontend
|
||||||
|
- **Framework**: Next.js 14+ (React)
|
||||||
|
- **Styling**: Tailwind CSS
|
||||||
|
- **Icons**: Lucide React
|
||||||
|
- **State Management**: React Query + Zustand
|
||||||
|
|
||||||
|
### Backend
|
||||||
|
- **Runtime**: Node.js (TypeScript)
|
||||||
|
- **Database**: PostgreSQL
|
||||||
|
- **Infrastructure**: Docker
|
||||||
|
|
||||||
|
## 🏁 Getting Started
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- Node.js 18+
|
||||||
|
- npm / pnpm / yarn
|
||||||
|
- Docker (optional, for database)
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. **Clone the repository:**
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/yusufipk/RepoHub.git
|
||||||
|
cd RepoHub
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Install dependencies:**
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
# or
|
||||||
|
pnpm install
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Set up Environment Variables:**
|
||||||
|
Copy `.env.example` to `.env` and configure your database connection.
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Run the development server:**
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
# or
|
||||||
|
pnpm dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||||
|
|
||||||
|
## 🤝 Contributing
|
||||||
|
|
||||||
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
||||||
|
|
||||||
|
1. Fork the project
|
||||||
|
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
||||||
|
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
||||||
|
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
||||||
|
5. Open a Pull Request
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
import { RepoHubApp } from '@/components/RepoHubApp'
|
import { RepoHubApp } from '@/components/RepoHubApp'
|
||||||
|
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
return <RepoHubApp />
|
const cryptomusEnabled = process.env.CRYPTOMUS_ENABLED !== 'false'
|
||||||
|
return <RepoHubApp cryptomusEnabled={cryptomusEnabled} />
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-18
@@ -5,29 +5,17 @@ import { Button } from '@/components/ui/button'
|
|||||||
import { useTheme } from '@/hooks/useTheme'
|
import { useTheme } from '@/hooks/useTheme'
|
||||||
import { useLocale } from '@/contexts/LocaleContext'
|
import { useLocale } from '@/contexts/LocaleContext'
|
||||||
import { SupportModal } from '@/components/SupportModal'
|
import { SupportModal } from '@/components/SupportModal'
|
||||||
import { Sun, Moon, Monitor, Globe, Heart } from 'lucide-react'
|
import { Sun, Moon, Monitor, Globe, Heart, Github } from 'lucide-react'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
|
||||||
export function Header() {
|
export interface HeaderProps {
|
||||||
|
cryptomusEnabled: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Header({ cryptomusEnabled }: HeaderProps) {
|
||||||
const { theme, isDark, toggleTheme } = useTheme()
|
const { theme, isDark, toggleTheme } = useTheme()
|
||||||
const { locale, toggleLocale, t } = useLocale()
|
const { locale, toggleLocale, t } = useLocale()
|
||||||
const [isSupportModalOpen, setIsSupportModalOpen] = useState(false)
|
const [isSupportModalOpen, setIsSupportModalOpen] = useState(false)
|
||||||
const [cryptomusEnabled, setCryptomusEnabled] = useState(true)
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const checkCryptomusStatus = async () => {
|
|
||||||
try {
|
|
||||||
const response = await fetch('/api/support/status', { cache: 'no-store' })
|
|
||||||
const data = await response.json()
|
|
||||||
setCryptomusEnabled(data.cryptomus_enabled)
|
|
||||||
} catch (error) {
|
|
||||||
// Default to enabled if check fails
|
|
||||||
setCryptomusEnabled(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
checkCryptomusStatus()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
const getThemeIcon = () => {
|
const getThemeIcon = () => {
|
||||||
switch (theme) {
|
switch (theme) {
|
||||||
@@ -85,6 +73,25 @@ export function Header() {
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* GitHub Link */}
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
asChild
|
||||||
|
className="w-full justify-start"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="https://github.com/yusufipk/RepoHub"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<Github className="h-4 w-4" />
|
||||||
|
<span className="ml-2 hidden sm:inline">
|
||||||
|
GitHub
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</Button>
|
||||||
|
|
||||||
{/* Theme Toggle */}
|
{/* Theme Toggle */}
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { generateScript } from '@/lib/scriptGenerator'
|
|||||||
import { useLocale } from '@/contexts/LocaleContext'
|
import { useLocale } from '@/contexts/LocaleContext'
|
||||||
import { Platform, Package, SelectedPackage, FilterOptions, GeneratedScript } from '@/types'
|
import { Platform, Package, SelectedPackage, FilterOptions, GeneratedScript } from '@/types'
|
||||||
|
|
||||||
function RepoHubAppContent() {
|
function RepoHubAppContent({ cryptomusEnabled }: { cryptomusEnabled: boolean }) {
|
||||||
const { t, locale } = useLocale()
|
const { t, locale } = useLocale()
|
||||||
const [selectedPlatform, setSelectedPlatform] = useState<Platform | null>(null)
|
const [selectedPlatform, setSelectedPlatform] = useState<Platform | null>(null)
|
||||||
const [selectedPackages, setSelectedPackages] = useState<SelectedPackage[]>([])
|
const [selectedPackages, setSelectedPackages] = useState<SelectedPackage[]>([])
|
||||||
@@ -61,8 +61,8 @@ function RepoHubAppContent() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={locale} className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
|
<div key={locale} className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
|
||||||
<Header />
|
<Header cryptomusEnabled={cryptomusEnabled} />
|
||||||
|
|
||||||
<div className="container mx-auto px-4 py-8">
|
<div className="container mx-auto px-4 py-8">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="text-center mb-8">
|
<div className="text-center mb-8">
|
||||||
@@ -116,10 +116,10 @@ function RepoHubAppContent() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function RepoHubApp() {
|
export function RepoHubApp({ cryptomusEnabled }: { cryptomusEnabled: boolean }) {
|
||||||
return (
|
return (
|
||||||
<LocaleProvider>
|
<LocaleProvider>
|
||||||
<RepoHubAppContent />
|
<RepoHubAppContent cryptomusEnabled={cryptomusEnabled} />
|
||||||
</LocaleProvider>
|
</LocaleProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user