-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip_publish deploy_docs] Updated docs
- Loading branch information
Showing
17 changed files
with
5,191 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
const User = require("./models/User"); | ||
module.exports = { | ||
Query: { | ||
async getUsers() { | ||
return await User.find(); | ||
|
||
const User = require('./models/User'); | ||
module.exports = { | ||
Query: { | ||
async getUsers() { | ||
return await User.find(); | ||
}, | ||
async getUser(_, { id }) { | ||
return await User.findById({_id : id}); | ||
} | ||
}, | ||
async getUser(_, { id }) { | ||
return await User.findById({ _id: id }); | ||
}, | ||
}, | ||
Mutation: { | ||
async createUser(_, { input }) { | ||
const newUser = new User(input); | ||
return await newUser.save(); | ||
}, | ||
async updateUser(_, { id, input }) { | ||
return await User.findByIdAndUpdate(id, input, { new: true }); | ||
}, | ||
async deleteUser(_, { id }) { | ||
return await User.findByIdAndDelete({ _id: id }); | ||
}, | ||
}, | ||
Mutation: { | ||
async createUser(_, { input }) { | ||
const newUser = new User(input); | ||
return await newUser.save(); | ||
}, | ||
async updateUser(_, { id, input }) { | ||
return await User.findByIdAndUpdate(id, input, { new: true }); | ||
}, | ||
async deleteUser(_, { id }) { | ||
return await User.findByIdAndDelete({_id :id}); | ||
} | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
type User { | ||
name: String | ||
email: String | ||
password: String | ||
} | ||
input UserInput { | ||
name: String | ||
email: String | ||
password: String | ||
} | ||
type Query { | ||
getUsers: [User] | ||
getUser(_id: ID): User | ||
} | ||
type Mutation { | ||
createUser(input: UserInput): User | ||
updateUser(_id: ID, input: UserInput): User | ||
deleteUser(_id: ID): User | ||
} | ||
|
||
type User { | ||
name: String | ||
email: String | ||
password: String | ||
} | ||
input UserInput { | ||
name: String | ||
email: String | ||
password: String | ||
} | ||
type Query { | ||
getUsers: [User] | ||
getUser(_id : ID): User | ||
|
||
} | ||
type Mutation { | ||
createUser(input: UserInput): User | ||
updateUser(_id: ID, input: UserInput): User | ||
deleteUser(_id: ID): User | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Card, CardContent } from "@sikka/hawa"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
import { Camera } from "lucide-react"; | ||
|
||
const FeatureCard = (props) => { | ||
return ( | ||
<Link href={props.link}> | ||
<div className="flex h-24 flex-row items-center gap-4 border p-4 bg-background rounded hover:drop-shadow-lg transition-all"> | ||
{props.icon} | ||
<div className="flex flex-col"> | ||
<div className="flex flex-row font-bold">{props.title}</div> | ||
<div className="text-start text-xs flex flex-row "> | ||
{props.subtitle} | ||
</div> | ||
</div> | ||
</div> | ||
</Link> | ||
); | ||
}; | ||
|
||
export default FeatureCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"type": "page", | ||
"display": "hidden", | ||
"theme": { | ||
"layout": "raw" | ||
"layout": "default" | ||
} | ||
}, | ||
"docs": { | ||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"setup": "SetupDatabase" | ||
"setup": "Setup Database", | ||
"connect": "Connect Database" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"setup-email": "Setup Email", | ||
"send-email": "Send Email", | ||
"schedule-email": "Schedule Email" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Schedule Email | ||
|
||
This will use a cron-job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Send Email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Setup Email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { Callout } from "nextra-theme-docs"; | ||
import Landing from "components/landing"; | ||
import FeatureCard from "components/FeatureCard"; | ||
import { Bleed } from "nextra-theme-docs"; | ||
|
||
import { Button } from "@sikka/hawa"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
|
||
const IndexPage = () => ( | ||
<div className="flex flex-col justify-center items-center text-center p-10 gap-6"> | ||
<div className="flex flex-col justify-center items-center max-w-lg"> | ||
<h1 className="text-center text-4xl tracking-tighter font-extrabold md:text-5xl mb-10"> | ||
Hajar | ||
</h1> | ||
<span> | ||
Hajar is a comprehensive toolkit for SaaS application development, | ||
offering simplified solutions for authentication, email management, | ||
database operations, storage, and more. | ||
</span> | ||
</div> | ||
<div className="flex flex-col justify-center items-center text-center"> | ||
<div className="flex flex-row gap-2"> | ||
<Link href="/docs"> | ||
<Button>Docs</Button> | ||
</Link> | ||
<a href="https://github.com/sikka-software/hajar"> | ||
<Button variant="outline">Github</Button> | ||
</a> | ||
</div> | ||
<p className="flex h-6 mt-4 gap-2"> | ||
<img alt="downloads" src="https://badgen.net/npm/v/@sikka/hajar" /> | ||
<img alt="downloads" src="https://badgen.net/npm/v/@sikka/hajar/beta" /> | ||
</p> | ||
</div> | ||
<div className="p-1 px-2 flex text-sm flex-row bg-yellow-100 border-yellow-300 border-2"> | ||
⌛ This docs site is still work in progress | ||
</div> | ||
<div className="grid grid-cols-2 gap-2 w-full max-w-lg "> | ||
<FeatureCard | ||
link="/docs/authentication" | ||
title="Authentication" | ||
subtitle="Run common authentication methods" | ||
/> | ||
<FeatureCard | ||
link="/docs/database" | ||
title="Database" | ||
subtitle="Setup & connect to a DB" | ||
/> | ||
<FeatureCard | ||
link="/docs/storage" | ||
title="Storage" | ||
subtitle="Setup storage and upload/download files" | ||
/> | ||
<FeatureCard link="/docs/emails" title="Emails" subtitle="Setup, send, and schedule emails" /> | ||
</div> | ||
|
||
<div className="flex w-full flex-col items-center opacity-50 "> | ||
<a href="https://sikka.io"> | ||
<img | ||
width="20" | ||
alt="Sikka" | ||
src={ | ||
"https://sikka-images.s3.ap-southeast-1.amazonaws.com/sikka/brand/black-symbol.png" | ||
} | ||
/> | ||
</a> | ||
<p align="center" className="m-0 mb-4 "> | ||
<sub> | ||
<a href="https://sikka.io">An open source project by Sikka</a> | ||
</sub> | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default IndexPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.