- About
- Demo
- Features
- Installation
- Usage
- API
- Contributing
The Code Snippet Sharing Platform is a web application that allows developers to share and discover code snippets. It provides a centralized platform for users to showcase their coding skills, learn from others.
Fetch and display code snippets from a dummy json server. Allow users to search code snippets by tags. Provide an interactive code editor for users to experiment with snippets. Support user interaction, such as liking.
The platform is designed for software developers and programmers who want to share their code solutions, learn from others' code, and collaborate with like-minded developers.
You can try out the live demo of the Code Snippet Sharing Platform here.
Note: In order to see snippets populated on page, run json server first.
- Fetch and display code snippets from a free API.
- Allow users to search and filter code snippets by language or tags.
- Provide an interactive code editor for users to experiment with snippets.
- Support user interaction, such as liking and bookmarking snippets.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Asaxena-2120/code-snippet-sharing-platform.git
-
In the terminal run
json-server --watch db.json
to start the mock server -
Open index.html in the default browser.
-
The Code Snippet Sharing Platform provides a user-friendly interface for browsing and interacting with code snippets.
-
Browse Snippets: Use the search to find relevant code snippets based on tags.
-
Code Editor: Click on a snippet to modify and test the code.
-
Interaction: Like your favorite snippets to save them for future reference.
The platform uses a mock API to fetch code snippets for demonstration purposes. The API provides a list of snippets in JSON format.
GET http://localhost:3000/snippets
[
{
"id": 1,
"title": "Sample Snippet 1",
"language": "JavaScript",
"code": "console.log('Hello, World!');",
"tags": ["example", "hello-world"]
},
{
"id": 2,
"title": "Sample Snippet 2",
"language": "Python",
"code": "print('Hello, World!')",
"tags": ["example", "hello-world"]
},
// More snippets...
]
We welcome contributions from the community! Please submit a pull request.
Made with โค๏ธ & ๐ต