HikeSpace is a full-stack social app, written in TypeScript/TSX and made with React, Node and Express, made for sharing hiking routes, photos, and trail stories.
Users can create route-based posts, view hiking paths on interactive maps, and explore content from other hikers in a feed-style interface.
- Frontend: https://hikespace.vercel.app/
- Backend: https://hikespace-production.up.railway.app
- API docs: https://hikespace-production.up.railway.app/docs
- User authentication (email/password via Better Auth).
- Post creation and management (create/read/update/delete).
- Route-based posts with geospatial trail data (
LineString, EPSG:4326). - Interactive map rendering for posts and route previewing.
- Image attachments linked to posts.
- Social interactions:
- Likes
- Follows
- Participation tagging
- User profile/content views and feed pages.
- React 19 + TypeScript
- Vite 7
- React Router 7
- SWR (data fetching/caching)
- Tailwind CSS 4 + shadcn/base-ui components
- React Leaflet + Leaflet
- Sonner + Lucide React
- Node.js + Express 5 + TypeScript
- PostgreSQL
- Drizzle ORM + Drizzle Kit (migrations/generation)
- Better Auth + Drizzle adapter
- Zod + zod-openapi + Swagger UI
- Multer (multipart HTTP form uploads)
- AWS SDK S3 client/presigner (S3-compatible storage integration)
- Pino + pino-http (structured logging)
- Frontend deployed on Vercel
- Backend deployed on Railway
hikespace/
frontend/ # React client app
backend/ # Node/Express API + DB layer
Run all services at once from the project root:
npm run devThis starts the database, backend, frontend, and Drizzle Studio in parallel via mprocs (no install needed).
- Node.js 20+
- npm
- PostgreSQL instance
cd backend
npm install
cp .env.example .envSet required values in .env:
DATABASE_URLBETTER_AUTH_SECRETBETTER_AUTH_URLSWAGGER_URLBACK_BLAZE_KEYBACK_BLAZE_KEY_IDBACK_BLAZE_BUCKET_URLBACK_BLAZE_BUCKET_NAME
Run migrations and start dev server:
npm run migrate
npm run devBackend runs on http://localhost:3000 by default.
cd frontend
npm installCreate .env in frontend/:
API_BASE_URL=http://localhost:3000Start frontend:
npm run devnpm run dev- start API in watch modenpm run build- compile TypeScriptnpm run generate- generate Drizzle migration filesnpm run migrate- apply database migrationsnpm run type-check- run TypeScript type checks
npm run dev- start Vite dev servernpm run build- build production assetsnpm run lint- run ESLintnpm run preview- preview production build
Main route groups:
-
/api/auth/*(auth handler) -
/users(CRUD on user accounts) -
/posts(CRUD on posts) -
/participations(representations for multiple users per post) -
/images(creating and deleting images on DB and CDN backend) -
/likes(creating likes from a user to a post) -
/follows(creating following records between users)
OpenAPI spec endpoint: /openapi.json