diff --git a/.env.dist b/.env.dist index 0cc0114..2c4a6aa 100644 --- a/.env.dist +++ b/.env.dist @@ -47,3 +47,9 @@ MERCURE_JWT_SECRET="!NotSoSecretMercureHubJWTSecretKey!" LNBITS_URL=https://legend.lnbits.com LNBITS_API_KEY= ###< LNBits ### + +###> magazine settings ### +MAGAZINE_NPUB= +MAGAZINE_D_TAG= +DEFAULT_RELAY_URL=wss://legend.relay.com +###< magazine settings ### diff --git a/README.md b/README.md index 28c17d7..852ee8e 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,4 @@ cd unfold ### Create the .env file Copy the example file `.env.dist` and replace placeholders with your actual configuration. + diff --git a/src/Command/NostrEventFromYamlDefinitionCommand.php b/src/Command/NostrEventFromYamlDefinitionCommand.php index 63a1167..9962c66 100644 --- a/src/Command/NostrEventFromYamlDefinitionCommand.php +++ b/src/Command/NostrEventFromYamlDefinitionCommand.php @@ -24,11 +24,11 @@ class NostrEventFromYamlDefinitionCommand extends Command { private string $nsec; - public function __construct(private readonly CacheInterface $redisCache, - private readonly NostrClient $client, - private readonly ArticleFactory $factory, - ParameterBagInterface $bag, - private readonly EntityManagerInterface $entityManager) + public function __construct(private readonly CacheInterface $cache, + private readonly NostrClient $client, + private readonly ArticleFactory $factory, + ParameterBagInterface $bag, + private readonly EntityManagerInterface $entityManager) { $this->nsec = $bag->get('nsec'); parent::__construct(); @@ -86,9 +86,9 @@ class NostrEventFromYamlDefinitionCommand extends Command }); // Generate a Redis key $cacheKey = 'magazine-' . $slug[0][1]; - $cacheItem = $this->redisCache->getItem($cacheKey); + $cacheItem = $this->cache->getItem($cacheKey); $cacheItem->set($event); - $this->redisCache->save($cacheItem); + $this->cache->save($cacheItem); $output->writeln("Saved index."); } catch (\Exception $e) { @@ -99,16 +99,13 @@ class NostrEventFromYamlDefinitionCommand extends Command // crawl relays for all the articles and save to db $fresh = $this->client->getArticles($articleSlugsList); - $articles = []; foreach ($fresh as $item) { $article = $this->factory->createFromLongFormContentEvent($item); $this->entityManager->persist($article); - $articles[] = $article; } $this->entityManager->flush(); $output->writeln('Articles saved to database.'); - $output->writeln('Conversion complete.'); return Command::SUCCESS; } } diff --git a/src/Controller/StaticController.php b/src/Controller/StaticController.php index 8bd4ce8..533ee5d 100644 --- a/src/Controller/StaticController.php +++ b/src/Controller/StaticController.php @@ -10,30 +10,6 @@ use Symfony\Component\Routing\Attribute\Route; class StaticController extends AbstractController { - #[Route('/about')] - public function about(): Response - { - return $this->render('static/about.html.twig'); - } - - #[Route('/roadmap')] - public function roadmap(): Response - { - return $this->render('static/roadmap.html.twig'); - } - - #[Route('/pricing')] - public function pricing(): Response - { - return $this->render('static/pricing.html.twig'); - } - - #[Route('/tos')] - public function tos(): Response - { - return $this->render('static/tos.html.twig'); - } - #[Route('/manifest.webmanifest', name: 'pwa_manifest')] public function manifest(): Response { diff --git a/templates/components/Footer.html.twig b/templates/components/Footer.html.twig index 604e4db..52bb2c0 100644 --- a/templates/components/Footer.html.twig +++ b/templates/components/Footer.html.twig @@ -1,9 +1 @@ - -

{{ "now"|date("Y") }} Decent Newsroom - v0.0.1 Preprint

+

{{ "now"|date("Y") }} Unfold Demo

diff --git a/templates/components/Header.html.twig b/templates/components/Header.html.twig index b2b9794..4402966 100644 --- a/templates/components/Header.html.twig +++ b/templates/components/Header.html.twig @@ -1,6 +1,6 @@
diff --git a/templates/static/about.html.twig b/templates/static/about.html.twig deleted file mode 100644 index 3a9223a..0000000 --- a/templates/static/about.html.twig +++ /dev/null @@ -1,36 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block nav %} -{% endblock %} - -{% block body %} -

About Decent Newsroom

-

Rebuilding Trust in Journalism

- -

The internet, and especially social media, made news instant and abundant, but also cheap and unreliable. The value of simply reporting what happened and where has dropped to zero, - buried under waves of misinformation, clickbait, and AI-generated noise. Worse, sorting truth from falsehood now costs more than spreading lies.

- -

Decent Newsroom is our answer to this crisis. We are building a curated, decentralized magazine featuring high-quality, long-form journalism published on Nostr.

- -

How It Works

-
-
Curated Excellence
-
We showcase a selection of featured articles.
- -
Indexed & Searchable
-
Every article in Decent Newsroom is easily discoverable, improving access for readers and exposure for authors.
-
Simple search is available to logged-in users.
-
Semantic search is in development.
- -
Open to Writers & Publishers Soon
-
Content creators can request indexing for their work, making it searchable and eligible for inclusion.
-
Publishers can create and manage their own magazines.
-
- -

Why It Matters

-

The age of the newsroom isn’t over—it’s just evolving. We believe in bringing back editorial standards, collaboration, and high-value reporting in a decentralized way. Decent Newsroom is here to cut through the noise and rebuild trust in digital journalism.

- -
-

To support us and get early access to the future of publishing, visit our crowdfunding page Geyser fund - Newsroom.

- -{% endblock %} diff --git a/templates/static/pricing.html.twig b/templates/static/pricing.html.twig deleted file mode 100644 index e8d9cbc..0000000 --- a/templates/static/pricing.html.twig +++ /dev/null @@ -1,43 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block nav %} -{% endblock %} - -{% block body %} -

Pricing

- -

Choose a plan that fits your publishing needs.

- -
-
-

Scoop Seeker

-

Free

-
    -
  • Read all the articles featured in the Newsroom magazine
  • -
- -
- -
-

Publisher

-

5.000 sats/month

-
    -
  • Submit indexing requests for priority indexing
  • -
  • Access to built-in content editor
  • -
  • Content search
  • -
- -
- -
-

Curator

-

15.000 sats/month

-
    -
  • Create and manage your own magazines
  • -
  • Advanced discovery tools
  • -
  • Featured magazine placement
  • -
- -
-
-{% endblock %} diff --git a/templates/static/roadmap.html.twig b/templates/static/roadmap.html.twig deleted file mode 100644 index bd0c35f..0000000 --- a/templates/static/roadmap.html.twig +++ /dev/null @@ -1,62 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block nav %} -{% endblock %} - -{% block body %} -

Roadmap: The Future of Decent Newsroom

-

We are building a decentralized, high-value journalism platform step by step. Each phase unlocks new features, - empowering writers, publishers, and readers to engage with quality, independent reporting in a whole new way.

- -
-

v0.1.0 – Preprint Current

-
-

A first glimpse into the future of journalism

-

This early version of Decent Newsroom is all about discovery. We’re launching a sample magazine - to showcase what’s possible.

-
    -
  • Hand-curated, high-quality articles in magazine format
  • -
  • Full-text search to find the stories that matter to you
  • -
  • No content editor or user submissions yet
  • -
-

Preprint is just the beginning.

-
-
- -
-

v0.2.0 – First Edition Soon

-
-

The real newsroom takes shape. Writers publish. Readers support. Journalism thrives.

-

This milestone version introduces key features that bring Decent Newsroom to life:

-
    -
  • Zaps
  • -
  • Content submissions
  • -
  • Subscriptions for premium access
  • -
  • Built-in content editor so publishers can create directly on the platform
  • -
-

With First Edition, journalism becomes more than just content, it becomes an ecosystem.

-

-
-
- -
-

v0.3.0 – Newsstand

-
-

Curate. Publish. Own your newsroom.

-

At this stage, Decent Newsroom evolves into a true platform for independent journalism. Not only can creators publish, but they can also curate their own magazines.

-
    -
  • Users can create and manage their own curated publications
  • -
  • Collaborative publishing tools – editors, writers, and photographers can work together
  • -
  • Expanded discovery and personalized reading experiences
  • -
-

Your news, your way. Newsstand transforms First Edition into a powerful hub for decentralized journalism, driven by the community.

-
-
- -

The Journey Ahead

-

Every step we take brings us closer to a new era of independent, decentralized journalism. Decent Newsroom isn’t just another publishing platform — it’s a movement to rebuild trust, quality, and collaboration in media.

-

First Edition is coming soon. Be part of it.

-
-

To support us and get early access to the future of publishing, visit our crowdfunding page Geyser fund - Newsroom.

- -{% endblock %} diff --git a/templates/static/tos.html.twig b/templates/static/tos.html.twig deleted file mode 100644 index 751444c..0000000 --- a/templates/static/tos.html.twig +++ /dev/null @@ -1,76 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block nav %} -{% endblock %} - -{% block body %} -

Terms of service

- -

Effective Date: April 1, 2025

- -

Welcome to Decent Newsroom. These Terms of Service ("Terms") govern your access to and use of our platform, - including the ability to publish, index, search, and subscribe to content. By using our services, you agree to these Terms.

- -
    -
  1. -

    Introduction

    -

    Decent Newsroom is a platform for discovering, curating, and publishing journalism on Nostr. - We provide tools for searching, indexing, and managing long-form content.

    -

    Decent Newsroom also publishes an open-access magazine, Newsroom magazine, comprised of a curated collection of english language articles.

    -
  2. - -
  3. -

    User Accounts & Responsibilities

    - -

    We do not store user credentials, emails, or passwords. Authentication is done via Nostr keys.

    - -

    Some data is stored and linked to your npub for debug and accounting purposes:

    -
      -
    • Subscription status and payment history (if applicable)
    • -
    • Search requests
    • -{#
    • Indexing requests
    • #} -
    -
  4. - -
  5. -

    Content & Ownership

    -

    The platform operates on the basis of open-access content.

    -

    We do not endorse or verify third-party content and are not responsible for its accuracy.

    -

    We reserve the right to include and exclude content from the indexer at our own discretion.

    -{#

    By requesting indexing, you agree that your content may be made publicly discoverable unless otherwise specified.

    #} -
  6. - -
  7. -

    Payments & Subscriptions

    -

    We use Lightning invoices for processing payments.

    -

    Some features, such as indexing requests, high-volume search, and premium content, require a paid subscription.

    -

    Payments are generally non-refundable, except in cases of accidental charges or platform malfunctions.

    -
  8. - -
  9. -

    Disclaimer of Warranties

    -

    The platform is provided "as is" and "as available" without warranties of any kind.

    -

    We do not guarantee uninterrupted service, accuracy, or security of content.

    -
  10. - -
  11. -

    Limitation of Liability

    -

    We are not responsible for any direct, indirect, or incidental damages arising from your use of the platform.

    -
  12. - -
  13. -

    Termination & Suspension

    -

    We reserve the right to suspend or terminate access if users violate these Terms.

    -

    Users can request deletion of their data at any time, though some content may remain indexed based on prior agreements.

    -
  14. - -
  15. -

    Changes to These Terms

    -

    We may update these Terms periodically. Continued use of the platform after modifications constitutes acceptance of the new Terms.

    -
  16. - - - -
- -{% endblock %}