A lightweight quiz/form web app built with Express, Firebase, and Tailwind CSS.
- About
- Features
- Tech stack
- Prerequisites
- Quick start (PowerShell)
- Development
- Production build
- Firebase / server notes
- Project structure
- Deployment
- Contributing
- License
This repository contains a small quiz/form application (internal name: aula) with a server (Express) and static HTML pages, designed to be deployed as a simple Node/Express API or serverless endpoint (the project includes vercel.json).
- Single-page HTML views for login, signup, dashboard, forming quizzes and taking quizzes
- Express server entrypoint at
api/index.js - Tailwind CSS for styling (input at
css/input.css, output atcss/output.css) - Firebase + Firebase Admin used for authentication and backend data
- Service worker support via
service-worker.js
- Node.js (CommonJS)
- Express
- Firebase (client and admin)
- Tailwind CSS (v4)
- DaisyUI
- Node.js (14+ recommended) and npm
- A Firebase project (if you want authentication / database)
- Install dependencies
npm install- Start Tailwind in watch mode (rebuilds
css/output.cssfromcss/input.css)
npm run tailwindcss- In another terminal, start the server (uses
nodemon)
npm run startOpen http://localhost:3000 (or the port configured in api/index.js) in your browser.
Notes:
- The
startscript invokesnodemon api/index.js. Ifnodemonis not installed globally it should still work becausenodemonis referenced via the script (install it locally or globally if needed).
- Edit the HTML under
api/html/andapi/or the top-levelapi/home.htmlfor server-side routes. - Frontend JS lives in
js/(for examplejs/account.js,js/utils.js). - CSS source is
css/input.css; the generated CSS iscss/output.css.
Production CSS build (minified):
npx tailwindcss -i ./css/input.css -o ./css/output.css --minify- The project depends on
firebaseandfirebase-admin. You will need to provide Firebase configuration for the frontend (usually via afirebaseConfigobject included in your client code) and a service account key or proper environment variables forfirebase-adminwhen running server-side features. - Common approaches:
- Place your Firebase client config in a safe client-side file or a build-time env and import it into the pages that need it.
- For server/admin usage, set
GOOGLE_APPLICATION_CREDENTIALSto point to a service account JSON file, or load the credentials from environment variables.
If you don't plan to use Firebase, remove firebase/firebase-admin usage or mock them in development.
- api/ - Express entry (
api/index.js) and server-side HTML- html/ - various HTML views used by the app
- css/ - Tailwind input and generated output
- js/ - frontend JavaScript (account, utils, etc.)
- images/ - logos and assets
- service-worker.js - offline/service worker script
- vercel.json - Vercel deployment configuration
This project includes vercel.json and is friendly to Vercel deployments. Alternatively you can deploy the Express app to any Node hosting provider (Heroku, Render, DigitalOcean App Platform).
On Vercel:
- Push the repository to a Git provider (GitHub, GitLab, etc.)
- Import the repo in the Vercel dashboard
- Set any required environment variables (Firebase credentials, API keys)
Contributions are welcome. Keep changes small and focused. If you add functionality that requires environment variables or external services, document them in the README.
- If
npm run startfails becausenodemonis missing, runnpm i -D nodemonor install it globally. - If Tailwind output isn't updating, ensure
npm run tailwindcssis running and thatcss/input.csscontains the Tailwind directives.
This project lists ISC in package.json; confirm or change as needed.
Tejas Nayak