Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iwatanikenji/ignews

Subscription based application with Next.js, Prismic CMS, Stripe and FaunaDB
https://github.com/iwatanikenji/ignews

css-modules faunadb jam-stack jest next-auth nextjs prismic sass ssr stripe-api vercel

Last synced: 12 days ago
JSON representation

Subscription based application with Next.js, Prismic CMS, Stripe and FaunaDB

Awesome Lists containing this project

README

        

Summary


📙 About
🖼️ Preview
📖 How to Start
💡 Features
💻 Technologies


✔️ Ig.news project finished ✔️

📙 About

Ig.news is a serverless website based on Next.js framework usage and has an authentication functionality that allows the user to get access to written content about the ReactJS world if he is logged in or a preview of the original content if he's not.


The access is allowed trough a payed monthly subscription and the authentication uses Github to get the user's basic information.


In conclusion, this application was used to implement and learn unit testing basic concepts and tips on how to set Vercel config and environment variables settings.


This project is originally created on Ignite from Rocketseat
and made by Kenji Iwatani


Check website →

---

🖼️ Preview

Project overview:

ignews website overview

Tests coverage report:

ignews website tests coverage report overview

---

📖 How to Start

Starting this repository:

```bash
# Clone this repository
$ git clone https://github.com/iwataniKenji/ignews

# Access the project directory
$ cd ignews
```

Creating and setting the project:


It's required an account on Stripe (for payment system), Fauna (for database functionality), and Prismic (to create publications of the website).

```bash
# Install dependencies
$ yarn

# On ".env.example" file, fill the environment variables according to the instructions provided
$

# Rename the config file
$ ren ".env.example" ".env.local"

# Execute stripe to listen the events from webhooks
$ stripe listen --forward-to localhost:3000/api/webhooks

# Initialize and open local host
$ yarn dev
```

Running tests:

```bash
# Run tests
$ yarn test
```

---

💡 Features

- [x] Static website with SSG
- [x] Github authentication
- [x] Subscription and payment system using Stripe
- [x] Redirect when not authenticated
- [x] Validation of active subscriptions
- [x] Prevents duplicated customers accounts
- [x] Posts preview functionality for non-subscribed users
- [x] Backend independent (serverless website)
- [x] Unit tests implemented and covering most of the application

---

💻 Technologies

- [x] Next.js
- [x] React
- [x] Typescript
- [x] SASS
- [x] CSS Modules
- [x] Prismic CMS
- [x] Stripe
- [x] FaunaDB
- [x] JAMStack
- [x] Jest
- [x] Vercel