Skip to content

Grammr/sreyas #1159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Grammr/sreyas-b-anand/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/babel","next/core-web-vitals"]
}
40 changes: 40 additions & 0 deletions Grammr/sreyas-b-anand/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts


*.env
.vercel
98 changes: 98 additions & 0 deletions Grammr/sreyas-b-anand/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Grammr

## Project Overview
**Grammr** is a web application built with **Next.js**, **JavaScript**, **Tailwind CSS**, and **Material-UI (MUI)** and **Gemini Api**.

## Table of Contents
1. [Installation](#installation)
2. [Usage](#usage)
3. [Tech Stack](#tech-stack)
4. [Features](#features)
5. [Contributing](#contributing)
6. [License](#license)

## Screenshots

Here’s a preview of the Grammr interface:

![Grammr App Screenshot](./assets/grammr.png)
## Installation
To set up the Grammr Checking App, follow these steps:

1. **Clone the Repository**
```bash
git clone https://github.com/sreyas-b-anand/grammr.git
cd grammr
2. **Install Dependencies**
- Ensure you have Node.js installed, then run:
```bash
npm install
3. **Run the Application**
Start the development server:
```bash
npm run dev

## API Integration

To utilize the Gemini API, you'll need to follow these steps to set up your API key:

1. **Obtain Your API Key**
- Sign up at [Google AI Studio](https://ai.google.dev/api) to obtain your API key.

2. **Set Up Your API Key**
- Create a `.env.local` file in the root of your project directory if you haven't already.
- Add your API key to the `.env.local` file:
```plaintext
NEXT_PUBLIC_API_KEY=your_api_key_here
```

3. **Install the Gemini API SDK**
- If you haven't installed it yet, add the Google AI JavaScript SDK to your project:
```bash
npm install @google/generative-ai
```

4. **Import the Library and Configure Your Key**
- In your application code, import the library and configure it with your API key:
```javascript
import { GenerativeAI } from '@google/generative-ai';

const aiClient = new GenerativeAI({
apiKey: process.env.NEXT_PUBLIC_API_KEY,
});
```

5. **Make Your First Request**
- Use the `generateContent` method to generate text:
```javascript
const response = await aiClient.generateContent({
prompt: "Your prompt here",
// Other parameters as needed
});
console.log(response);
```

6. **Restart Your Development Server**
- After setting up your API key and making changes, restart your development server:
```bash
npm run dev
```

Make sure to keep your `.env.local` file secure and do not share it publicly.
- Access the app in your web browser at http://localhost:3000.
## Tech Stack
- Next.js: A React framework for server-side rendering and static site generation.
- JavaScript: The programming language used for building interactive features.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
- Material-UI (MUI): A React UI framework that implements Material Design principles.
## Features
- Real-time Grammar Correction: Utilizes Gramformer to provide immediate feedback on grammar errors.
- Responsive Design: Built with Tailwind CSS for a mobile-friendly experience.
- Customizable Components: Leverages MUI for pre-designed, accessible UI components.
- Open Source: The application is open for contributions and improvements.

## Contributing
- Contributions are welcome! Please follow these steps:

## License
- This project is licensed under the MIT License - see the LICENSE file for details.
Binary file added Grammr/sreyas-b-anand/assets/grammr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions Grammr/sreyas-b-anand/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
4 changes: 4 additions & 0 deletions Grammr/sreyas-b-anand/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
Loading
Loading