Skip to content

Commit

Permalink
Merge pull request #24 from seemorg/dev
Browse files Browse the repository at this point in the history
Production deployment
  • Loading branch information
ahmedriad1 authored Sep 25, 2024
2 parents 08c96cd + 5b746c8 commit fb7cd21
Show file tree
Hide file tree
Showing 675 changed files with 42,460 additions and 4,969 deletions.
12 changes: 11 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
TYPESENSE_API_KEY=secret
TYPESENSE_URL=http://localhost:8108
NEXT_PUBLIC_SEMANTIC_SEARCH_URL=http://localhost:3001

DATABASE_URL='postgresql://postgres:password@localhost:5432/your_db_name'

RESEND_API_KEY=''
RESEND_AUDIENCE_ID=''
RESEND_AUDIENCE_ID=''

NEXT_PUBLIC_PDF_EXPRESS_LICENSE_KEY=

# ANALYTICS
NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT=
NEXT_PUBLIC_CLARITY_PROJECT_ID=
NEXT_PUBLIC_ENABLE_CLARITY=
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID=
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public/pdf-express
27 changes: 13 additions & 14 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import type { StorybookConfig } from '@storybook/nextjs';
import type { StorybookConfig } from "@storybook/nextjs";

const config: StorybookConfig = {
"stories": [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
"addons": [
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
staticDirs: ["../public"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions"
"@storybook/addon-interactions",
],
"framework": {
"name": "@storybook/nextjs",
"options": {}
framework: {
name: "@storybook/nextjs",
options: {},
},
docs: {
autodocs: "tag",
},
"docs": {
"autodocs": "tag"
}
};
export default config;

export default config;
23 changes: 22 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,30 @@ import React from "react";

import "../src/styles/globals.css";
import "./storybook.css";
import { NextIntlClientProvider } from "next-intl";
import { getSharedConfig } from "../src/i18n";

import common from "../locales/en/common.json";
import entities from "../locales/en/entities.json";
import home from "../locales/en/home.json";
import meta from "../locales/en/meta.json";
import reader from "../locales/en/reader.json";

const Wrapper = ({ children }: { children: React.ReactNode }) => {
return <div className="font-sans">{children}</div>;
return (
<NextIntlClientProvider
messages={{
common,
entities,
home,
meta,
reader,
}}
{...getSharedConfig("en")}
>
<div className="font-sans">{children}</div>
</NextIntlClientProvider>
);
};

const preview: Preview = {
Expand Down
162 changes: 162 additions & 0 deletions golden-shamela.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
- https: //api.goldenshamela.com/api/guest/categorytree

```json
{
"success": true,
"data": [
{
"categoryid": 92,
"categoryname": "التفاسير",
"status": true,
"translate": {
"categorynametrans": {
"ar": "التفاسير",
"en": "التفاسير",
"fa": "tfaseer"
}
},
"books_count": 770,
"children": [
{
"categoryid": 9,
"categoryname": "التفاسيرعربي",
"status": true,
"translate": {
"categorynametrans": {
"ar": "التفاسير",
"en": "tfseer",
"fa": "سليسش"
}
},
"books_count": 731,
"children": [],
"parent_id": 92,
"parent_name": "التفاسير"
}
]
}
]
}
```

- https://api.goldenshamela.com/api/guest/book?filter[categories.categoryid]=92&page=1

```json
{
"data": [
{
"bookid": 1926,
"bookname": "(جامع المواعظ والرقائق فيما حوته كتب ابن الجوزي من فوائد ورقائق)",
"counterview": 6625,
"counterdownload": 0,
"publisheryear": null
},
{
"bookid": 30065,
"bookname": "{تفسير القرآن المجيد من الكتاب والسنة المطهرة} تفسير جزء الأحقاف",
"counterview": 1777,
"counterdownload": 0,
"publisheryear": null
},
{
"bookid": 1927,
"bookname": "50 فائدة وقاعدة",
"counterview": 2504,
"counterdownload": 0,
"publisheryear": null
}
]
}
```

- https://api.goldenshamela.com/api/guest/book/1926

```json
{
"success": true,
"data": {
"bookid": 1926,
"bookname": "(جامع المواعظ والرقائق فيما حوته كتب ابن الجوزي من فوائد ورقائق)",
"counterview": 6628,
"counterdownload": 0,
"bookdsecription": "المؤلف: جمال الدين أبو الفرج عبد الرحمن بن علي بن محمد الجوزي (المتوفى: 597 هـ)\nجمع وترتيب/ العاجز الفقير: عبد الرحمن القماش\n(من علماء الأزهر الشريف)\n[الكتاب مرقم آليا، وهو غير مطبوع]\nالمصدر: الشاملة الذهبية",
"isdownloadable": true,
"booklink": null,
"lang": {
"langid": 1,
"langname": "العربية",
"langcode": "ar"
},
"categories": [
{
"categoryid": 9,
"categoryname": "التفاسيرعربي",
"translate": {
"categorynametrans": {
"ar": "التفاسير",
"en": "tfseer",
"fa": "سليسش"
}
}
}
],
"author": [
{
"authorid": 608,
"authorname": "ابن الجوزي"
}
],
"publisher": [
{
"publisherid": 4,
"publishername": "www.goldenshamela.com",
"publisheryear": 597
}
],
"metainfo": [
{
"id": 231543,
"meta_name": "title",
"meta_value": "(جامع المواعظ والرقائق فيما حوته كتب ابن الجوزي من فوائد ورقائق)"
},
{
"id": 231544,
"meta_name": "creator",
"meta_value": "ابن الجوزي"
},
{
"id": 231545,
"meta_name": "contributor",
"meta_value": "calibre (5.14.0) [https://calibre-ebook.com]"
},
{
"id": 231546,
"meta_name": "publisher",
"meta_value": "www.goldenshamela.com"
},
{
"id": 231547,
"meta_name": "identifier",
"meta_value": "16597930-d46b-4773-8199-74a390ca9b6e"
},
{
"id": 231548,
"meta_name": "identifier",
"meta_value": "16597930-d46b-4773-8199-74a390ca9b6e"
},
{
"id": 231549,
"meta_name": "date",
"meta_value": "0101-01-01T00:00:00+00:00"
},
{
"id": 231550,
"meta_name": "language",
"meta_value": "ar"
}
],
"fileurl": "https://api.goldenshamela.com//storage/attachment/NTuWPqzILsV8Q2Jq7OCNBb3yjomDNQva499jdkEd.epub",
"cover": null
}
}
```
8 changes: 6 additions & 2 deletions locales/ar/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"from": "من",
"to": "الى",
"search-bar": {
"recent-searches": "عمليات البحث الأخيرة",
"recent-searches-placeholder": "ستظهر عمليات البحث الأخيرة هنا",
"popular-searches": "عمليات البحث الشائعة",
"popular-collections": "المجموعات الشائعة",
"placeholder": "ابحث عن نص",
"start-typing": "ابدأ بالكتابة...",
"no-results": "لم يتم العثور على نتائج",
Expand Down Expand Up @@ -145,6 +149,6 @@
"success": "شكراً لك!",
"error": "حدث خطأ ما. يرجى المحاولة مرة أخرى لاحقًا."
},
"year-filter-info": "تصفية حسب سنة وفاة المؤلف",
"regions-filter-info": "تصفية حسب المنطقة التي ولد فيها المؤلف، أو أقام فيها، أو زارها، أو توفي فيها"
"year-filter-info": "سنة وفاة المؤلف",
"regions-filter-info": "المواقع التي زارها المؤلف أو وُلد أو تُوفي بها"
}
1 change: 1 addition & 0 deletions locales/ar/entities.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"all": "الكل",
"text": "نص",
"texts": "نصوص",
"x-texts": "{count, plural, zero {}=0 {لا توجد نصوص} one {# نص} two {# نصوص} few {# نصوص} many {# نصوص} other {# نصوص}}",
Expand Down
3 changes: 2 additions & 1 deletion locales/ar/home.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"headline": "أداة البحث للنصوص الإسلامية",
"headline": "استكشف 8,000+ من النصوص الإسلامية",
"subheadline": "اقرأ وابحث وادرس النصوص من Shamela وOpenITI",
"try": "جرّب: ",
"sections": {
"collections": "مجموعات",
Expand Down
8 changes: 6 additions & 2 deletions locales/bn/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"from": "থেকে",
"to": "প্রতি",
"search-bar": {
"recent-searches": "সম্প্রতিকালীন অনুসন্ধানসমূহ",
"recent-searches-placeholder": "আপনার সাম্প্রতিক অনুসন্ধান এখানে প্রদর্শিত হবে",
"popular-searches": "জনপ্রিয় অনুসন্ধানসমূহ",
"popular-collections": "জনপ্রিয় সংগ্রহসমূহ",
"placeholder": "একটি টেক্সট অনুসন্ধান করুন",
"start-typing": "টাইপ শুরু করুন...",
"no-results": "কোনো ফলাফল পাওয়া যায়নি",
Expand Down Expand Up @@ -145,6 +149,6 @@
"success": "ধন্যবাদ!",
"error": "কিছু ভুল হয়েছে। দয়া করে পরে আবার চেষ্টা করুন।"
},
"year-filter-info": "লেখকের মৃত্যুর বছর দ্বারা ফিল্টার করুন",
"regions-filter-info": "লেখক যেই অঞ্চলে জন্মগ্রহণ করেছেন, বাস করেছেন, পরিদর্শন করেছেন বা মারা গেছেন সেই অঞ্চল দ্বারা ফিল্টার করুন"
"year-filter-info": "লেখকের মৃত্যুর বছর",
"regions-filter-info": "যেসব স্থানে লেখক ভ্রমণ করেছেন, জন্মেছেন বা মারা গেছেন"
}
1 change: 1 addition & 0 deletions locales/bn/entities.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"all": "সব",
"text": "পাঠ্য",
"texts": "পাঠ্যগুলি",
"x-texts": "{count, plural, =0 {কোনো পাঠ্য নেই} one {# পাঠ্য} other {# পাঠ্যগুলি}}",
Expand Down
3 changes: 2 additions & 1 deletion locales/bn/home.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"headline": "ইসলামিক টেক্সটের জন্য গবেষণা টুল",
"headline": "৮,০০০+ ইসলামিক টেক্সট অন্বেষণ করুন",
"subheadline": "শামেলা এবং ওপেনআইটিআই থেকে পাঠসমূহ পড়ুন, অনুসন্ধান করুন এবং গবেষণা করুন",
"try": "চেষ্টা করুন: ",
"sections": {
"collections": "সংগ্রহসমূহ",
Expand Down
8 changes: 6 additions & 2 deletions locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"from": "From",
"to": "To",
"search-bar": {
"recent-searches": "Recent Searches",
"recent-searches-placeholder": "Your recent searches will show up here",
"popular-searches": "Popular Searches",
"popular-collections": "Popular Collections",
"placeholder": "Search for a text",
"start-typing": "Start typing...",
"no-results": "No results found",
Expand Down Expand Up @@ -145,6 +149,6 @@
"success": "Thank you!",
"error": "Something went wrong. Please try again later."
},
"year-filter-info": "Filter by author's death year",
"regions-filter-info": "Filter by a region the author was born in, resided, visited, or died"
"year-filter-info": "Author's death year",
"regions-filter-info": "Locations where the author has visited, been born, or died"
}
1 change: 1 addition & 0 deletions locales/en/entities.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"all": "All",
"text": "Text",
"texts": "Texts",
"x-texts": "{count, plural, =0 {No texts} one {# Text} other {# Texts}}",
Expand Down
3 changes: 2 additions & 1 deletion locales/en/home.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"headline": "The Research tool for Islamic Texts",
"headline": "Explore 8,000+ Islamic Texts",
"subheadline": "Read, search, and research Texts from Shamela and OpenITI",
"try": "Try: ",
"sections": {
"collections": "Collections",
Expand Down
12 changes: 11 additions & 1 deletion locales/en/reader.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,15 @@
"description": "This book is not available on Usul but we found a version somewhere else.",
"navigate": "Navigate"
},
"download-pdf": "Download PDF"
"download-pdf": "Download PDF",
"publication-details": {
"title": "Publication Details",
"book-title": "Title",
"author": "Author",
"editor": "Editor",
"publisher": "Publisher",
"print-version": "Print Version",
"volumes": "Volumes",
"page-numbers-match-print": "Page numbers match print"
}
}
8 changes: 6 additions & 2 deletions locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"from": "Desde",
"to": "Hasta",
"search-bar": {
"recent-searches": "Búsquedas recientes",
"recent-searches-placeholder": "Tus búsquedas recientes aparecerán aquí",
"popular-searches": "Búsquedas populares",
"popular-collections": "Colecciones populares",
"placeholder": "Buscar un texto",
"start-typing": "Comienza a escribir...",
"no-results": "No se encontraron resultados",
Expand Down Expand Up @@ -145,6 +149,6 @@
"success": "¡Gracias!",
"error": "Algo salió mal. Por favor, intenta de nuevo más tarde."
},
"year-filter-info": "Filtrar por el año de la muerte del autor",
"regions-filter-info": "Filtrar por una región donde el autor nació, residió, visitó o murió"
"year-filter-info": "Año de fallecimiento del autor",
"regions-filter-info": "Ubicaciones donde el autor ha visitado, nacido o fallecido"
}
Loading

0 comments on commit fb7cd21

Please sign in to comment.