Skip to content

Commit d81ec72

Browse files
Merge pull request #1159 from sreyas-b-anand/codespace-moonlit-goblin-q7qj7xjg94wp2xvqr
Grammr/sreyas
2 parents 84ac88e + 190f7fc commit d81ec72

22 files changed

+6431
-1
lines changed

Grammr/sreyas-b-anand/.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["next/babel","next/core-web-vitals"]
3+
}

Grammr/sreyas-b-anand/.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
37+
38+
39+
*.env
40+
.vercel

Grammr/sreyas-b-anand/README.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Grammr
2+
3+
## Project Overview
4+
**Grammr** is a web application built with **Next.js**, **JavaScript**, **Tailwind CSS**, and **Material-UI (MUI)** and **Gemini Api**.
5+
6+
## Table of Contents
7+
1. [Installation](#installation)
8+
2. [Usage](#usage)
9+
3. [Tech Stack](#tech-stack)
10+
4. [Features](#features)
11+
5. [Contributing](#contributing)
12+
6. [License](#license)
13+
14+
## Screenshots
15+
16+
Here’s a preview of the Grammr interface:
17+
18+
![Grammr App Screenshot](./assets/grammr.png)
19+
## Installation
20+
To set up the Grammr Checking App, follow these steps:
21+
22+
1. **Clone the Repository**
23+
```bash
24+
git clone https://github.com/sreyas-b-anand/grammr.git
25+
cd grammr
26+
2. **Install Dependencies**
27+
- Ensure you have Node.js installed, then run:
28+
```bash
29+
npm install
30+
3. **Run the Application**
31+
Start the development server:
32+
```bash
33+
npm run dev
34+
35+
## API Integration
36+
37+
To utilize the Gemini API, you'll need to follow these steps to set up your API key:
38+
39+
1. **Obtain Your API Key**
40+
- Sign up at [Google AI Studio](https://ai.google.dev/api) to obtain your API key.
41+
42+
2. **Set Up Your API Key**
43+
- Create a `.env.local` file in the root of your project directory if you haven't already.
44+
- Add your API key to the `.env.local` file:
45+
```plaintext
46+
NEXT_PUBLIC_API_KEY=your_api_key_here
47+
```
48+
49+
3. **Install the Gemini API SDK**
50+
- If you haven't installed it yet, add the Google AI JavaScript SDK to your project:
51+
```bash
52+
npm install @google/generative-ai
53+
```
54+
55+
4. **Import the Library and Configure Your Key**
56+
- In your application code, import the library and configure it with your API key:
57+
```javascript
58+
import { GenerativeAI } from '@google/generative-ai';
59+
60+
const aiClient = new GenerativeAI({
61+
apiKey: process.env.NEXT_PUBLIC_API_KEY,
62+
});
63+
```
64+
65+
5. **Make Your First Request**
66+
- Use the `generateContent` method to generate text:
67+
```javascript
68+
const response = await aiClient.generateContent({
69+
prompt: "Your prompt here",
70+
// Other parameters as needed
71+
});
72+
console.log(response);
73+
```
74+
75+
6. **Restart Your Development Server**
76+
- After setting up your API key and making changes, restart your development server:
77+
```bash
78+
npm run dev
79+
```
80+
81+
Make sure to keep your `.env.local` file secure and do not share it publicly.
82+
- Access the app in your web browser at http://localhost:3000.
83+
## Tech Stack
84+
- Next.js: A React framework for server-side rendering and static site generation.
85+
- JavaScript: The programming language used for building interactive features.
86+
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
87+
- Material-UI (MUI): A React UI framework that implements Material Design principles.
88+
## Features
89+
- Real-time Grammar Correction: Utilizes Gramformer to provide immediate feedback on grammar errors.
90+
- Responsive Design: Built with Tailwind CSS for a mobile-friendly experience.
91+
- Customizable Components: Leverages MUI for pre-designed, accessible UI components.
92+
- Open Source: The application is open for contributions and improvements.
93+
94+
## Contributing
95+
- Contributions are welcome! Please follow these steps:
96+
97+
## License
98+
- This project is licensed under the MIT License - see the LICENSE file for details.
33.3 KB
Loading

Grammr/sreyas-b-anand/jsconfig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
}
7+
}

Grammr/sreyas-b-anand/next.config.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {};
3+
4+
export default nextConfig;

0 commit comments

Comments
 (0)