Welcome to Stock Watchlist Web app! This project combines Django as the backend framework and React as the frontend library.
- Backend:
- Django
- Django REST Framework
- Frontend:
- React
- Material UI
- Typescript
- User Authentication using JWT
- Search for stocks using stock symbols and add to watchlist
- Monitor the stocks added to the watchlist
To run this project locally, follow these steps:
- Clone this repository to your local machine.
- Navigate to the
backend
directory. - Create a virtual environment:
python -m venv env
. - Activate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS/Linux:
source env/bin/activate
- On Windows:
- Install dependencies:
pip install -r requirements.txt
. - Run migrations:
python manage.py migrate
. - Start the Django development server:
python manage.py runserver
.
- Navigate to the
frontend
directory. - Install dependencies:
npm install
oryarn install
. - Add these two environment variables:
- REACT_APP_API_URL = "http://127.0.0.1:8000"
- REACT_APP_ALPHA_VANTAGE_API_KEY = <YOUR_APLHA_VANTAGE_API_KEY>
- Start the React development server:
npm start
oryarn start
.
Once the backend and frontend servers are running, you can access the application through your web browser at http://localhost:3000
.
- POST
/api/auth/login
: Authenticates a user and returns a JWT token. - POST
/api/auth/register
: Registers a new user.
- GET
/api/stocks
: Retrieves a list of stocks. - GET
/api/stocks/:symbol
: Retrieves details of a specific stock.
- POST
/api/auth/logout
: Logs out the current user.