A full‑stack Q&A app for all things planetary. Users can register, log in, ask questions, and post answers about planets in our solar system. Built with a modern React + Vite frontend and an Express + PostgreSQL backend.
- 🔐 User authentication with sessions
- 📝 Post questions and 💬 add answers
- 🗑️ Delete questions and answers (with cascading delete)
- 🪐 Category browsing by planet
- ⚡ Fast React + Vite frontend
- 🕙 View the most recent questions and answers first
- 🗄️ PostgreSQL persistence
- 🛡️ CORS configured for production deployments
- Frontend: React 19, Vite 7, Axios, CSS Modules
- Backend: Node.js, Express 5, express-session, bcryptjs, cors, validator
- Database: PostgreSQL (pg)
- Config: dotenv
- Optional Session Store: Redis (via connect-redis)
backend/ssqueries_be: Express backend server, routes, controllers, and database configuration.frontend/ssqueries_fe: React/Vite frontend source code and configuration.
Prereqs:
- Node.js 18+ (recommended: 20+)
- PostgreSQL running locally or via a cloud instance
- (Optional) Redis server for session storage
- Clone and install
git clone <your-repo-url>cd backend/ssqueries_be && npm installcd ../../frontend/ssqueries_fe && npm install
- Configure environment variables
Use the provided .env.example files as templates for your .env configuration.
Backend (backend/ssqueries_be/.env):
PORT=8000NODE_ENV=developmentDB_HOST=localhostDB_PORT=5432DB_USER=your_userDB_PASSWORD=your_passwordDB_NAME=your_dbSESSION_SECRET=a_very_long_random_stringREDIS_URL=redis://localhost:6379
Frontend (frontend/ssqueries_fe/.env):
VITE_BACKEND_URL=http://localhost:8000NODE_ENV=development
- Start services
Backend:
cd backend/ssqueries_benpm start
Frontend:
cd frontend/ssqueries_fenpm run dev- Open the printed local URL (typically http://localhost:5173)
userstable: (id, username, password)questionstable: (id, user-id, content, created_at, planet)answerstable: (id, user-id, content, created_at, question-id)