Skip to content

RickyBenevelli/caffeina_politica_2.0

Repository files navigation

Caffeina Politica

This is the repository for the new Caffeina Politica website. It's development is currently in progress.

Technologies

This website is built with Next.js and TypeScript. Tailwind CSS and Shadcn are used for styling.

For authentication, NextAuth.js is used.

I opted for session strategy = database, using an Adapter. I need to consider changing session strategy to JWT. This would allow me to use a middleware, but would make that to change a user's role, they must first log out.

When a user logs in, their data is stored in a database. This is done using Prisma.

This choice was made to obtain a role-based site and to administer user permissions

The database that will be used will be either MySQL or PostgreSQL.

Articles are written in MDX and validated via Contentlayer.

The articles have been separated from their bibliography, which will still be written in MDX. This allows you to solve the reading time problem, present on the previous version of the site

For fetching data, TanStack is used.

Data in admin console are displayed using Recharts.

I would like to include an automatic article reading function, using react-speech-kit.


Project Phases

Phase 0

  • setup project
  • add shadcn and tailwind
  • add icon system management

Phase 1

  • create autentication system
  • add provider to save user data
  • modelling database

Phase 2

  • navbar
  • structure of pages
  • footer

Phase 3

  • Contentlayer
  • articles

Phase 4

  • style of articles (heading, ...)
  • bibliography
  • reading time
  • views (+ add to db)

Phase 5

  • correct all articles
  • add links (and style them)
  • add video yt in mdx

Phase 6

  • test the site from normal user perspective
  • test user roles
  • aggiungere Zod

Firts Release 🎉


Phase 7

  • admin console
  • users list
  • articles table
  • articles titles links

Phase 8

  • graphs

Phase 9

  • search bar
  • automatic reading
  • comments
  • handle session multiple views

Final Release 🎉 🎉

Possible Graphs

  • views per article (bar chart)
  • views across time (year, month, week, day)
  • number of qrcode generated across time and per article
  • views per category (grafico a ragnatela)
  • views per author