diff --git a/.changeset/README.md b/.changeset/README.md
new file mode 100644
index 0000000..e5b6d8d
--- /dev/null
+++ b/.changeset/README.md
@@ -0,0 +1,8 @@
+# Changesets
+
+Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
+with multi-package repos, or single-package repos to help you version and publish your code. You can
+find the full documentation for it [in our repository](https://github.com/changesets/changesets)
+
+We have a quick list of common questions to get you started engaging with this project in
+[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
diff --git a/.changeset/config.json b/.changeset/config.json
new file mode 100644
index 0000000..f02b50b
--- /dev/null
+++ b/.changeset/config.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
+ "changelog": "@changesets/cli/changelog",
+ "commit": false,
+ "fixed": [],
+ "linked": [],
+ "access": "restricted",
+ "baseBranch": "dev",
+ "updateInternalDependencies": "patch",
+ "ignore": []
+}
diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..0660fa7
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,2 @@
+# NEXT_PUBLIC_GA_ID=""
+# NEXT_PUBLIC_GOOGLE_ADSENSE_ACCOUNT=""
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..ddde066
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,32 @@
+name: Release
+
+on:
+ push:
+ branches:
+ - dev
+
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
+jobs:
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v3
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 22.15.0
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+
+ - name: Install Dependencies
+ run: pnpm install
+
+ - name: Create Release Pull Request
+ uses: changesets/action@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 5ef6a52..7b8da95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ yarn-error.log*
# env files (can opt-in for committing if needed)
.env*
+!.env.example
# vercel
.vercel
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..1801c67
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,7 @@
+# sourcemap-online
+
+## 0.1.1
+
+### Patch Changes
+
+- env & mode toggle
diff --git a/README.md b/README.md
index e215bc4..8546d1f 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,100 @@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
+# Source Map Online Parser
+
+
+

+
+
Online JavaScript Source Map parser, supporting single file parsing and error stack parsing
+
+
+## Features
+
+- 🔍 **Source Map Parsing**: Parse and analyze JavaScript source maps online
+- 📝 **Error Stack Parsing**: Convert minified error stacks to original source locations
+- 🎯 **Single File Support**: Parse individual source map files
+- 🌙 **Dark Mode**: Support for both light and dark themes
+- 📱 **Responsive Design**: Works seamlessly on desktop and mobile devices
+- 🚀 **Fast & Efficient**: Built with Next.js and optimized for performance
## Getting Started
-First, run the development server:
+### Prerequisites
+
+- Node.js >= 22.15.0
+- pnpm >= 10.11.0
+
+### Installation
+
+1. Clone the repository:
+```bash
+git clone https://github.com/whale4113/sourcemap-online
+cd sourcemap-online
+```
+
+2. Install dependencies:
+```bash
+pnpm install
+```
+3. Start the development server:
```bash
-npm run dev
-# or
-yarn dev
-# or
pnpm dev
-# or
-bun dev
```
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+
+## Development
+
+### Project Structure
+
+```
+sourcemap-online/
+├── app/ # Next.js app directory
+├── components/ # React components
+├── lib/ # Utility functions and shared logic
+├── public/ # Static assets
+└── styles/ # Global styles
+```
+
+### Available Scripts
+
+- `pnpm dev` - Start development server
+- `pnpm build` - Build for production
+- `pnpm start` - Start production server
+- `pnpm lint` - Run ESLint
+
+### Tech Stack
+
+- [Next.js](https://nextjs.org/) - React framework
+- [TypeScript](https://www.typescriptlang.org/) - Type safety
+- [Tailwind CSS](https://tailwindcss.com/) - Styling
+- [Zustand](https://github.com/pmndrs/zustand) - State management
+- [source-map-js](https://github.com/7rulnik/source-map-js) - Source map parsing
+
+## Contributing
-You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
+### How to Contribute
-## Learn More
+1. Fork the repository
+2. Create your feature branch (`git checkout -b feature/amazing-feature`)
+3. Commit your changes (`git commit -m 'Add some amazing feature'`)
+4. Push to the branch (`git push origin feature/amazing-feature`)
+5. Open a Pull Request
-To learn more about Next.js, take a look at the following resources:
+### Development Guidelines
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+- Follow the existing code style
+- Write meaningful commit messages
+- Add tests for new features
+- Update documentation as needed
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
+## License
-## Deploy on Vercel
+This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+## Acknowledgments
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
+- [Next.js](https://nextjs.org/) for the amazing framework
+- [source-map-js](https://github.com/7rulnik/source-map-js) for the source map parsing library
+- All contributors who have helped shape this project
diff --git a/app/layout.tsx b/app/layout.tsx
index a264ea6..ce9624d 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -3,6 +3,7 @@ import { Geist, Geist_Mono } from "next/font/google";
import { GoogleAnalytics } from "@next/third-parties/google";
import { ThemeProvider } from "@/components/theme-provider";
import { Toaster } from "@/components/ui/sonner";
+import { env } from "@/lib/env";
import "./globals.css";
const geistSans = Geist({
@@ -87,12 +88,16 @@ export default function RootLayout({
{children}
-
-
+ {env.NEXT_PUBLIC_GA_ID !== undefined && (
+
+ )}
+ {env.NEXT_PUBLIC_GOOGLE_ADSENSE_ACCOUNT !== undefined && (
+
+ )}