Skip to content

Max0709202/twitter-analystic

Repository files navigation

Twitter Analytics App

Full-stack web app for Web and Mobile Design coursework: users sign in, search Twitter via the Twitter API v2, and view analytics with Chart.js. Sessions and data live in MongoDB; contact, signup, and password flows use Nodemailer, Google reCAPTCHA, and JWT reset links.

Live demo: https://my-twitter-analytics-app.onrender.com

Stack

Area Technologies
Runtime & server Node.js, Express, EJS
Data MongoDB, Mongoose, connect-mongo sessions
External APIs Twitter API v2, Google reCAPTCHA
Frontend Bootstrap, Chart.js, Web Workers
Security & UX Helmet (CSP), bcrypt, JWT (password reset), Gravatar

Prerequisites

  • Node.js (LTS recommended)
  • MongoDB Atlas (or compatible cluster) and a Twitter developer Bearer token
  • SMTP credentials if you use contact / forgot-password email
  • Google reCAPTCHA v2 keys (site key is in the EJS views; secret goes in env)

Setup

npm install

Create a .env file in the project root (never commit real secrets):

Variable Purpose
PORT HTTP port (default 3000)
Db_Username, Db_Password, Db_Cluster, Db_Name MongoDB Atlas connection
Session_name, Session_secret Express session cookie name and secret
Bearer_Token Twitter API v2 bearer token
CAPTCHA_SECRET Google reCAPTCHA secret
EMAIL, EMAIL_PSW Nodemailer SMTP user and password
Server_Secret Base secret for JWT password-reset tokens
HOSTNAME Host used in reset links (e.g. localhost:3000 or your production domain)

Run locally

npm run devStart

Uses nodemon on server.js. For a one-off run without file watching:

node server.js

Scripts

Command Description
npm run devStart Start with nodemon (reloads on changes; *.json ignored per config)

Author & license

Sameera Kaluwaduge — ISC (see package.json).

Repository: https://github.com/samdsk/lab-pwm

About

A Node.js/Express web app that connects to the Twitter API v2 and MongoDB to collect and visualize Twitter analytics (charts, auth, reCAPTCHA, email), built as a Web and Mobile Design course project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors