A production-ready platform where rock enthusiasts can share photos of rocks with one another, participate in iSpy-style rock hunts, earn achievements, and connect with the geology community!
Rock Spotter features a professionally designed visual system with:
π Full Documentation:
Rock-Spotter/
βββ backend/ # Node.js/Express API server
β βββ src/
β β βββ models/ # MongoDB models (User, Rock, Hunt, Achievement)
β β βββ routes/ # API routes
β β βββ controllers/ # Business logic
β β βββ middleware/ # Auth and validation
β β βββ server.js # Express app setup
β βββ package.json
β βββ README.md
βββ mobile-app/ # React Native mobile app (planned)
β βββ src/
β β βββ theme/ # Complete design system & styling
β β βββ assets/ # Icons, images, fonts
β βββ README.md
βββ docs/ # Additional documentation
β βββ API.md # API reference
β βββ DESIGN_SYSTEM.md # Design system guide
β βββ STYLE_GUIDE.md # Visual style guide
β βββ SETUP.md # Setup instructions
β βββ HUNTS.md # Hunt system details
β βββ SAMPLE_DATA.md # Testing data
βββ README.md # This file
Option 2: Manual Setup
# 1. Clone and setup
git clone https://github.com/jmenichole/Rock-Spotter.git
cd Rock-Spotter
./deploy-setup.sh
# 2. Follow DEPLOYMENT.md for Vercel + MongoDB Atlas setup
π Complete deployment guide: DEPLOYMENT.md
cd backend
npm install
.env file (copy from .env.example):
cp .env.example .env
.env file with your configuration:
PORT=3000
MONGODB_URI=mongodb://localhost:27017/rock-spotter
JWT_SECRET=your-secret-key-here
npm run dev
npm start
The API will be available at `http://localhost:3000`
### Mobile App Setup
The mobile app is currently in the planning phase. See `mobile-app/README.md` for more information.
## π API Documentation
The backend provides a RESTful API with the following endpoints:
### Authentication
- `POST /api/users/register` - Register new user
- `POST /api/users/login` - Login user
- `GET /api/users/profile/me` - Get current user profile
- `PUT /api/users/profile/me` - Update profile
### Rocks
- `GET /api/rocks` - Get all rocks (with filters)
- `GET /api/rocks/nearby` - Get rocks near location
- `GET /api/rocks/:id` - Get specific rock
- `POST /api/rocks` - Create rock post
- `PUT /api/rocks/:id` - Update rock post
- `DELETE /api/rocks/:id` - Delete rock post
- `POST /api/rocks/:id/like` - Like/unlike rock
- `POST /api/rocks/:id/comment` - Add comment
### Hunts
- `GET /api/hunts` - Get all hunts
- `GET /api/hunts/:id` - Get specific hunt
- `POST /api/hunts` - Create new hunt
- `PUT /api/hunts/:id` - Update hunt
- `DELETE /api/hunts/:id` - Delete hunt
- `POST /api/hunts/:id/join` - Join a hunt
- `POST /api/hunts/:huntId/rocks/:rockId/found` - Mark rock as found
- `GET /api/hunts/my/progress` - Get user's hunt progress
### Achievements
- `GET /api/achievements` - Get all achievements
- `GET /api/achievements/:id` - Get specific achievement
- `POST /api/achievements` - Create achievement
- `POST /api/achievements/award` - Award achievement to user
- `GET /api/achievements/user/:userId` - Get user's achievements
For detailed API documentation, see `backend/README.md`
## ποΈ Database Models
### User
- Username, email, password
- Profile picture and bio
- Rock count and hunt count
- Achievements earned
### Rock
- Title, description, photo URL
- Location (GeoJSON with coordinates)
- Rock type classification
- Tags and visibility settings
- Likes and comments
### Hunt
- Title, description, difficulty
- Creator and participants
- Rock list with hints and order
- Start/end dates and active status
- Progress tracking for participants
### Achievement
- Name, description, icon
- Type and rarity
- Criteria for earning
- Awarded to users
## π― Use Cases
### For Rock Enthusiasts
- Document and share your rock collection
- Connect with other collectors
- Learn about different rock types
- Discover new locations for rock hunting
### For Educators
- Create educational rock hunts for students
- Share geology knowledge through photos
- Organize field trip challenges
- Track student participation
### For Communities
- Organize local rock hunting events
- Create city-wide scavenger hunts
- Promote outdoor activities
- Build community engagement
## π Deployment
The Rock Spotter backend is **production-ready** and can be deployed in minutes to various cloud platforms!
### π― One-Click Deploy
Choose your preferred platform and deploy instantly:
| Platform | Time | Free Tier | MongoDB | Best For |
|----------|------|-----------|---------|----------|
| [**Docker**](/Rock-Spotter/docker-compose.yml) | 1 min | β
| Included | Local/VPS |
| [**Railway**](https://railway.app) | 2 min | $5 credit | Included | Easiest |
| [**Render**](https://render.com) | 5 min | 750 hrs/mo | External | Beginners |
| [**Heroku**](https://heroku.com) | 5 min | 1000 hrs/mo | Add-on | Classic |
### β‘ Quick Deploy Commands
**Docker (Fastest)**:
```bash
git clone https://github.com/jmenichole/Rock-Spotter.git
cd Rock-Spotter
docker-compose up -d
Railway (Easiest):
npm i -g railway
railway login && railway up
See QUICK-DEPLOY.md for one-line commands for all platforms!
Dockerfile - Container image for the backenddocker-compose.yml - Full stack with MongoDBrender.yaml - Render blueprint configurationrailway.json - Railway configurationProcfile - Heroku/similar platforms.github/workflows/ci.yml - CI/CD pipelinedeploy-setup.sh - Interactive deployment wizardverify-deployment.sh - Deployment verification./verify-deployment.sh https://your-api-url.com
Automatically tests all endpoints and confirms your API is working!
Contributions are welcome! Please feel free to submit issues and pull requests.
MIT License - see LICENSE file for details
Built for rock enthusiasts, geologists, educators, and anyone who loves exploring the natural world!
Happy Rock Hunting! πͺ¨π