A React application designed to provide a customizable stock widget that can be embedded into websites. This project uses Vite for build optimization, TypeScript for type safety, and Tailwind CSS for styling.
Project is in development this is a prototype using mock data. TODO: Setup backend server on port 8080
- Customizable stock widget displaying real-time stock data.
- Built with React and TypeScript for robust and scalable code.
- Styled with Tailwind CSS for a modern and responsive design.
- Optimized build process with Vite for fast development and production builds.
To get started with the Embed Stock Widget, clone the repository and install the dependencies:
git clone https://github.com/yourusername/embed-stock-widget.git
cd embed-stock-widget
npm install
To start a local development server with hot module replacement, use:
npm run dev
This will open the application at http://localhost:5173
(or a similar port) in your default browser.
To build the application for production, run:
npm run build
The production build will be output to the dist
directory, with bundle.js
and bundle.css
files for easy deployment.
To embed the widget in a website, include the generated bundle.js
and bundle.css
files in your HTML and add a div
with an ID provided by dashboard like client1
:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Embed Stock Widget</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/Wallstock-org/embed-stock-widget/dist/bundle.css"
/>
</head>
<body>
<div id="client1"></div>
<script src="https://cdn.jsdelivr.net/gh/Wallstock-org/embed-stock-widget/dist/bundle.js"></script>
</body>
</html>
If you have tests set up, you can run them with:
npm test
To lint your code, use:
bun run lint
The build command will create a production-ready version of the app in the dist
directory:
bun run build
Contributions are welcome! Please follow these guidelines:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature
. - Commit your changes:
git commit -am 'Add new feature'
. - Push to the branch:
git push origin feature/your-feature
. - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.