Skip to content

Latest commit

 

History

47 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astronaut Logo

🌌 Solar System Queries

Live Demo

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.

✨ Features

  • 🔐 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

🧱 Tech Stack

  • 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)

📁 Project Structure

  • backend/ssqueries_be: Express backend server, routes, controllers, and database configuration.
  • frontend/ssqueries_fe: React/Vite frontend source code and configuration.

🚀 Getting Started (Local)

Prereqs:

  • Node.js 18+ (recommended: 20+)
  • PostgreSQL running locally or via a cloud instance
  • (Optional) Redis server for session storage
  1. Clone and install
  • git clone <your-repo-url>
  • cd backend/ssqueries_be && npm install
  • cd ../../frontend/ssqueries_fe && npm install
  1. Configure environment variables

Use the provided .env.example files as templates for your .env configuration.

Backend (backend/ssqueries_be/.env):

  • PORT=8000
  • NODE_ENV=development
  • DB_HOST=localhost
  • DB_PORT=5432
  • DB_USER=your_user
  • DB_PASSWORD=your_password
  • DB_NAME=your_db
  • SESSION_SECRET=a_very_long_random_string
  • REDIS_URL=redis://localhost:6379

Frontend (frontend/ssqueries_fe/.env):

  • VITE_BACKEND_URL=http://localhost:8000
  • NODE_ENV=development
  1. Start services

Backend:

  • cd backend/ssqueries_be
  • npm start

Frontend:

🗄️ Database Schema (Minimal)

  • users table: (id, username, password)
  • questions table: (id, user-id, content, created_at, planet)
  • answers table: (id, user-id, content, created_at, question-id)

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages