├── public ├── fav.ico ├── placeholder-logo.png ├── placeholder.jpg ├── placeholder-user.jpg ├── placeholder-logo.svg └── placeholder.svg ├── .dockerignore ├── postcss.config.mjs ├── app ├── quran │ ├── page.tsx │ ├── surahs │ │ └── page.tsx │ ├── surah │ │ └── [id] │ │ │ └── page.tsx │ └── page │ │ └── [number] │ │ └── page.tsx ├── developers │ ├── metadata.ts │ └── page.tsx ├── page.tsx ├── api │ └── quran │ │ ├── chapters │ │ └── route.ts │ │ ├── surah │ │ └── [id] │ │ │ └── route.ts │ │ └── pages │ │ └── [number] │ │ └── route.ts ├── layout.tsx └── globals.css ├── components ├── ui │ ├── aspect-ratio.tsx │ ├── loading-spinner.tsx │ ├── skeleton.tsx │ ├── collapsible.tsx │ ├── use-mobile.tsx │ ├── textarea.tsx │ ├── label.tsx │ ├── input.tsx │ ├── separator.tsx │ ├── progress.tsx │ ├── toaster.tsx │ ├── sonner.tsx │ ├── checkbox.tsx │ ├── slider.tsx │ ├── switch.tsx │ ├── badge.tsx │ ├── tooltip.tsx │ ├── hover-card.tsx │ ├── popover.tsx │ ├── avatar.tsx │ ├── radio-group.tsx │ ├── toggle.tsx │ ├── alert.tsx │ ├── scroll-area.tsx │ ├── resizable.tsx │ ├── toggle-group.tsx │ ├── tabs.tsx │ ├── button.tsx │ ├── card.tsx │ ├── accordion.tsx │ ├── input-otp.tsx │ ├── calendar.tsx │ ├── breadcrumb.tsx │ ├── pagination.tsx │ ├── table.tsx │ ├── drawer.tsx │ ├── dialog.tsx │ ├── use-toast.ts │ ├── sheet.tsx │ ├── form.tsx │ ├── alert-dialog.tsx │ ├── toast.tsx │ ├── command.tsx │ └── navigation-menu.tsx ├── theme-provider.tsx ├── query-provider.tsx ├── language-toggle.tsx ├── theme-toggle.tsx ├── developers │ ├── developer-welcome.tsx │ ├── contribute.tsx │ └── community.tsx ├── layout │ ├── mobile-navigation.tsx │ ├── header.tsx │ └── footer.tsx ├── landing │ ├── features.tsx │ └── cta.tsx └── quran │ ├── surah-reader.tsx │ └── surah-navigation.tsx ├── next.config.mjs ├── docker-compose.yml ├── .gitignore ├── .github └── ISSUE_TEMPLATE │ ├── hata-raporu.md │ └── ozellik-istegi.md ├── components.json ├── hooks ├── use-mobile.tsx ├── use-surah-name.ts └── use-toast.ts ├── lib └── utils.ts ├── Dockerfile ├── tsconfig.json ├── types └── quran.ts ├── package.json ├── CODE_OF_CONDUCT.md ├── tailwind.config.js ├── services ├── quran-api.ts └── api-client.ts ├── stores └── quran-store.ts ├── styles └── globals.css ├── INSTALLATION.md └── CONTRIBUTING.md /public/fav.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diyanet-bid/Kuran/HEAD/public/fav.ico -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | .git 4 | .gitignore 5 | Dockerfile 6 | docker-compose.yml 7 | *.log 8 | *.md 9 | .vscode 10 | .env 11 | *.tsbuildinfo -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /app/quran/page.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "next/navigation" 2 | 3 | export default function QuranPage() { 4 | // Redirect to first page by default 5 | redirect("/quran/page/1") 6 | } 7 | -------------------------------------------------------------------------------- /components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 4 | 5 | const AspectRatio = AspectRatioPrimitive.Root 6 | 7 | export { AspectRatio } 8 | -------------------------------------------------------------------------------- /components/ui/loading-spinner.tsx: -------------------------------------------------------------------------------- 1 | import { Loader2 } from "lucide-react" 2 | 3 | export function LoadingSpinner() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { ThemeProvider as NextThemesProvider } from "next-themes" 3 | import type { ThemeProviderProps } from "next-themes" 4 | 5 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 6 | return {children} 7 | } 8 | -------------------------------------------------------------------------------- /app/developers/metadata.ts: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next" 2 | 3 | export const metadata: Metadata = { 4 | title: "Geliştiriciler - Kuran-ı Kerim Açık Kaynak Projesi", 5 | description: 6 | "Kuran-ı Kerim açık kaynak projesine katkıda bulunun. Diyanet İşleri Başkanlığı desteğinde geliştirilen bu projeye nasıl dahil olabileceğinizi öğrenin.", 7 | } -------------------------------------------------------------------------------- /components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 4 | 5 | const Collapsible = CollapsiblePrimitive.Root 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 12 | -------------------------------------------------------------------------------- /app/quran/surahs/page.tsx: -------------------------------------------------------------------------------- 1 | import { SurahList } from "@/components/quran/surah-list" 2 | import { Header } from "@/components/layout/header" 3 | 4 | export default function SurahsPage() { 5 | return ( 6 |
7 |
8 |
9 | 10 |
11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | experimental: { 4 | optimizePackageImports: ['lucide-react'], 5 | }, 6 | eslint: { 7 | ignoreDuringBuilds: true, 8 | }, 9 | typescript: { 10 | ignoreBuildErrors: true, 11 | }, 12 | images: { 13 | domains: ['localhost'], 14 | unoptimized: true, 15 | }, 16 | } 17 | 18 | export default nextConfig 19 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | open-quran: 4 | build: . 5 | container_name: open-quran 6 | ports: 7 | - "3000:3000" 8 | env_file: 9 | - .env.local 10 | restart: unless-stopped 11 | healthcheck: 12 | test: ["CMD", "sh", "-c", "curl -f http://localhost:3000 || exit 1"] 13 | interval: 10s 14 | timeout: 3s 15 | retries: 3 16 | start_period: 10s -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # next.js 7 | /.next/ 8 | /out/ 9 | 10 | # production 11 | /build 12 | 13 | # debug 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | .pnpm-debug.log* 18 | 19 | # env files 20 | .env* 21 | !.env.example 22 | 23 | # typescript 24 | *.tsbuildinfo 25 | next-env.d.ts 26 | 27 | /.vscode/ 28 | /.idea/ 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/hata-raporu.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Hata raporu 3 | about: Geliştirmemize yardımcı olacak bir rapor oluşturun 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Açıklama 11 | [Kısaca sorunu ya da önerinizi açıklayın.] 12 | 13 | ## Beklenen Davranış 14 | [Olması gereken durum] 15 | 16 | ## Gerçekleşen Davranış 17 | [Şu anda olan durum] 18 | 19 | ## Tekrarlama Adımları 20 | 1. ... 21 | 2. ... 22 | 3. ... 23 | 24 | ## Ek Notlar 25 | [Varsa ekran görüntüsü, log, öneri] -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /public/placeholder-logo.png: -------------------------------------------------------------------------------- 1 | �PNG 2 |  3 | IHDR�M��0PLTEZ? tRNS� �@��`P0p���w �IDATx��ؽJ3Q�7'��%�|?� ���E�l�7���(X�D������w`����[�*t����D���mD�}��4; ;�DDDDDDDDDDDD_�_İ��!�y�`�_�:�� ;Ļ�'|� ��;.I"����3*5����J�1�� �T��FI�� ��=��3܃�2~�b���0��U9\��]�4�#w0��Gt\&1 �?21,���o!e�m��ĻR�����5�� ؽAJ�9��R)�5�0.FFASaǃ�T�#|�K���I�������1� 4 | M������N"��$����G�V�T� ��T^^��A�$S��h(�������G]co"J׸^^�'�=���%� �W�6Ы�W��w�a�߇*�^^�YG�c���`'F����������������^5_�,�S�%IEND�B`� -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | import { Hero } from "@/components/landing/hero" 2 | import { Features } from "@/components/landing/features" 3 | import { Community } from "@/components/landing/community" 4 | import { CTA } from "@/components/landing/cta" 5 | import { Header } from "@/components/layout/header" 6 | import { Footer } from "@/components/layout/footer" 7 | 8 | export default function HomePage() { 9 | return ( 10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /hooks/use-mobile.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener("change", onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener("change", onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /components/ui/use-mobile.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener("change", onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener("change", onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ozellik-istegi.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Özellik isteği 3 | about: Bu proje için bir fikir önerin 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Özellik isteğiniz bir sorunla mı ilgili? Lütfen açıklayın.** 11 | Sorunun ne olduğunun açık ve öz bir açıklaması. Örn. [...] olduğunda her zaman hayal kırıklığına uğruyorum. 12 | 13 | **İstediğiniz çözümü açıklayın** 14 | Ne olmasını istediğinizin açık ve öz bir açıklaması. 15 | 16 | **Düşündüğünüz alternatifleri açıklayın** 17 | Düşündüğünüz alternatif çözümlerin veya özelliklerin açık ve öz bir açıklaması. 18 | 19 | **Ek bağlam** 20 | Özellik isteğiyle ilgili diğer bağlamları veya ekran görüntülerini buraya ekleyin. -------------------------------------------------------------------------------- /hooks/use-surah-name.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useQuery } from "@tanstack/react-query"; 4 | import { getSurahList } from "@/services/quran-api"; 5 | import { useLanguage } from "@/components/language-provider"; 6 | 7 | export function useSurahName() { 8 | const { language } = useLanguage(); 9 | 10 | const { data: surahs } = useQuery({ 11 | queryKey: ["surahs"], 12 | queryFn: getSurahList, 13 | }); 14 | 15 | const getSurahName = (id: number) => { 16 | const surah = surahs?.find((item) => item.id === id); 17 | if (!surah) return `${id}. sure`; 18 | const name = language === "tr" ? surah.names.tr : surah.names.en; 19 | return `${id}. ${name} suresi`; 20 | }; 21 | 22 | return { getSurahName, surahs }; 23 | } 24 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export function getOrdinal(n: number, lang: string) { 9 | if (lang === "tr") return "."; 10 | if (lang === "en") return getEnglishOrdinal(n); 11 | return n.toString(); 12 | } 13 | 14 | export function getEnglishOrdinal(n: number): string { 15 | const v = n % 100; 16 | 17 | if (v >= 11 && v <= 13) { 18 | return "th"; 19 | } 20 | 21 | switch (n % 10) { 22 | case 1: 23 | return "st"; 24 | case 2: 25 | return "nd"; 26 | case 3: 27 | return "rd"; 28 | default: 29 | return "th"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |