SurfMarc is a web application that helps users make informed purchase decisions by providing comprehensive product information, price tracking, and sentiment analysis.
- Price Tracking: Monitor price changes and get notified when prices drop to your desired level.
- Product Analysis: Get detailed product information, specifications, and comparisons across different sellers.
- Sentiment Analysis: Analyze customer reviews and feedback to understand product sentiment and make data-driven decisions.
- Frontend: Next.js 14 with TypeScript and Tailwind CSS
- Backend: FastAPI with Python 3.11.2
- Database: Supabase
- Authentication: JWT with FastAPI
- Containerization: Docker and Docker Compose (Backend only)
surfmarc/
├── .env # Environment variables
├── docker-compose.yml # Docker Compose configuration
├── server/ # Backend server code
│ ├── Dockerfile
│ ├── .dockerignore
│ ├── requirements.txt
│ └── app/
│ ├── api/
│ ├── core/
│ ├── crud/
│ ├── db/
│ ├── models/
│ └── schemas/
└── app/ # Frontend code
├── components/
├── globals.css
└── page.tsx
- Node.js 18.x or later
- Python 3.11.2
- Docker and Docker Compose
- Supabase account and credentials
Create a .env
file in the root directory with the following variables:
# Supabase Configuration
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
# JWT Configuration
SECRET_KEY=your_secret_key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=43200
# URLS
NEXT_PUBLIC_SERVER_URL=http://localhost:8000
CLIENT_URL=http://localhost:3000
- Make sure Docker Desktop is running
- Build and start the container:
docker-compose up --build
- Access the API at http://localhost:8000
- View API documentation at http://localhost:8000/docs
The container is configured with hot-reload enabled, so any changes you make to the server code will automatically restart the application.
-
Create and activate a virtual environment:
# Windows python -m venv venv venv\Scripts\activate # Unix/MacOS python3 -m venv venv source venv/bin/activate
-
Install dependencies:
cd server pip install -r requirements.txt
-
Start the FastAPI server:
uvicorn main:app --reload
-
Install dependencies:
cd app npm install
-
Start the development server:
npm run dev
-
Access the application at http://localhost:3000
POST /api/v1/auth/register
: Register a new userPOST /api/v1/auth/login
: Login and get access tokenGET /api/v1/users/me
: Get current user information
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.